protocol
tool_diagnostics_protocol
Common machine-readable diagnostics protocol for developer tools.
logtalk_load(tool_diagnostics(loader))static
Targets and options: Implementing objects should enumerate supported targets using
diagnostic_target/1and predicates taking anOptionsargument must acceptexplanations(Boolean).Tool metadata predicate: Tool metadata is exposed using
diagnostics_tool/5.Rule descriptor predicate: Rule descriptors are exposed using
diagnostic_rule/5and collected in stable order usingdiagnostic_rules/1.Diagnostic and preflight terms: Findings and analysis prerequisites are represented using
diagnostic/8andpreflight_issue/7terms.Summary term: Summaries are represented using
diagnostics_summary/5terms with supporting breakdown and count terms.
Public predicates
diagnostics_tool/5
Returns tool metadata.
staticdiagnostics_tool(Id,Name,Version,InformationURI,Properties)diagnostics_tool(?atom,?atom,?atom,?atom,?list(compound)) - zero_or_onediagnostic_target/1
Enumerates supported diagnostics target patterns.
staticdiagnostic_target(Target)diagnostic_target(?nonvar) - zero_or_morediagnostic_rule/5
Enumerates diagnostic rule descriptors.
staticdiagnostic_rule(RuleId,ShortDescription,FullDescription,DefaultSeverity,Properties)diagnostic_rule(?atom,?atom,?atom,?atom,?list(compound)) - zero_or_morediagnostic_rules/1
Returns all supported diagnostic rule descriptors in a stable order.
staticdiagnostic_rules(Rules)diagnostic_rules(-list(compound)) - onediagnostic/3
Enumerates, by backtracking, diagnostics for a target using the given options. Diagnostics are returned using terms of the form diagnostic(RuleId, Severity, Confidence, Message, Context, File, Lines, Properties). All implementations must accept the common option explanations(Boolean).
staticdiagnostic(Target,Diagnostic,Options)diagnostic(+nonvar,-compound,+list(compound)) - zero_or_morediagnostic/2
Enumerates, by backtracking, diagnostics for a target using default options. Diagnostics are returned using terms of the form diagnostic(RuleId, Severity, Confidence, Message, Context, File, Lines, Properties).
staticdiagnostic(Target,Diagnostic)diagnostic(+nonvar,-compound) - zero_or_morediagnostics/3
Returns an ordered set of diagnostics for a target using the given options. Diagnostics are returned using terms of the form diagnostic(RuleId, Severity, Confidence, Message, Context, File, Lines, Properties). All implementations must accept the common option explanations(Boolean).
staticdiagnostics(Target,Diagnostics,Options)diagnostics(+nonvar,-list(compound),+list(compound)) - onediagnostics/2
Returns an ordered set of diagnostics for a target using default options. Diagnostics are returned using terms of the form diagnostic(RuleId, Severity, Confidence, Message, Context, File, Lines, Properties).
staticdiagnostics(Target,Diagnostics)diagnostics(+nonvar,-list(compound)) - onediagnostics_summary/3
Returns a machine-readable summary for a target using the given options. The summary counts diagnostics only and does not include preflight issues. All implementations must accept the common option explanations(Boolean).
staticdiagnostics_summary(Target,Summary,Options)diagnostics_summary(+nonvar,-compound,+list(compound)) - onediagnostics_summary/2
Returns a machine-readable summary for a target using default options. The summary counts diagnostics only and does not include preflight issues.
staticdiagnostics_summary(Target,Summary)diagnostics_summary(+nonvar,-compound) - onediagnostics_preflight/3
Returns an ordered set of machine-readable preflight issues for a target using the given options. Preflight issues are returned using terms of the form preflight_issue(Id, Severity, Message, Context, File, Lines, Properties). All implementations must accept the common option explanations(Boolean).
staticdiagnostics_preflight(Target,Issues,Options)diagnostics_preflight(+nonvar,-list(compound),+list(compound)) - onediagnostics_preflight/2
Returns an ordered set of machine-readable preflight issues for a target using default options. Preflight issues are returned using terms of the form preflight_issue(Id, Severity, Message, Context, File, Lines, Properties).
staticdiagnostics_preflight(Target,Issues)diagnostics_preflight(+nonvar,-list(compound)) - oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)