object
linter_reporter
Intercepts compiler linter warnings and caches them as machine-readable diagnostics.
logtalk_load(linter_reporter(loader))static, context_switching_calls
Usage: Load this tool before compiling code to be checked by the built-in linter. Call
enable/0-1before compiling code,disable/0when finished collecting warnings, and then query the cached warnings using either the legacy warning predicates or the diagnostics protocol predicates. The standalonesariftool can generate SARIF reports by querying these diagnostics.Diagnostics targets: The diagnostics predicates accept the targets
all,entity(Entity),file(File),directory(Directory),rdirectory(Directory),library(Library), andrlibrary(Library). These targets simply filter the cached diagnostics collected in the current warning collection session.
Public predicates
enable/0
Enables warning collection and starts a fresh warning collection session using the default options.
staticenable - oneenable/1
Enables warning collection and starts a fresh warning collection session using the given options.
staticenable(Options)enable(+list(compound)) - one_or_errordisable/0
Disables warning collection while preserving the cached warnings for later querying.
staticdisable - onereset/0
Clears all cached warnings collected in the current session.
staticreset - onewarning/1
Enumerates normalized linter warnings collected in the current session.
staticwarning(Warning)warning(-compound) - zero_or_morewarnings/1
Returns the collected normalized linter warnings.
staticwarnings(Warnings)warnings(-list(compound)) - onesummary/1
Returns a machine-readable summary for the collected linter warnings.
staticsummary(Summary)summary(-compound) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
enabled_/0
True when warning collection is enabled.
dynamicenabled_ - zero_or_onewarning_sequence_/1
Stores the last assigned warning sequence number.
dynamicwarning_sequence_(Sequence)warning_sequence_(-integer) - zero_or_onerecorded_warning_/4
Caches collected warnings together with their sequence number, flag, normalized message term, and printed message tokens.
dynamicrecorded_warning_(Sequence,Flag,Message,Tokens)recorded_warning_(?integer,?atom,?compound,?list(compound)) - zero_or_morecollection_options_/1
Stores the merged options for the current warning collection session.
dynamiccollection_options_(Options)collection_options_(-list(compound)) - zero_or_oneOperators
(none)