Package org.egothor.methodatlas.command
Class SarifCommand
java.lang.Object
org.egothor.methodatlas.command.SarifCommand
- All Implemented Interfaces:
Command
CLI command handler for the
-sarif output mode.
Scans one or more source roots, buffers all discovered test-method records, and serializes the result as a single SARIF 2.1.0 JSON document once the scan completes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSarifCommand(CliConfig cliConfig, org.egothor.methodatlas.api.TestDiscoveryConfig discoveryConfig, AiSuggestionEngine aiEngine, ClassificationOverride override, AiResultCache aiCache) Creates a new SARIF command. -
Method Summary
Modifier and TypeMethodDescriptionintexecute(PrintWriter out) Scans all roots and emits the buffered result as SARIF JSON.
-
Constructor Details
-
SarifCommand
public SarifCommand(CliConfig cliConfig, org.egothor.methodatlas.api.TestDiscoveryConfig discoveryConfig, AiSuggestionEngine aiEngine, ClassificationOverride override, AiResultCache aiCache) Creates a new SARIF command.- Parameters:
cliConfig- full parsed CLI configurationdiscoveryConfig- discovery configuration forwarded to providersaiEngine- AI engine providing suggestions;nullwhen AI is disabledoverride- human classification overridesaiCache- AI result cache
-
-
Method Details
-
execute
Scans all roots and emits the buffered result as SARIF JSON.- Specified by:
executein interfaceCommand- Parameters:
out- writer that receives the serialized SARIF document- Returns:
0if all files were processed successfully,1if any file produced a parse or processing error- Throws:
IOException- if traversing a file tree fails
-