Package org.egothor.methodatlas
Record Class CliConfig
java.lang.Object
java.lang.Record
org.egothor.methodatlas.CliConfig
- Record Components:
outputMode- selected output modeaiOptions- AI configuration controlling provider selection, taxonomy, limits, and timeoutspaths- root paths to scan; when empty, the current working directory is scannedfileSuffixes- one or more filename suffixes used to select source files for scanning; a file is included if its name ends with any of the listed suffixestestMarkers- language-neutral identifiers that mark test methods; for JVM providers these are annotation simple names (e.g."Test","ParameterizedTest"); for .NET providers they are attribute names; TypeScript providers typically ignore this and use function names viapropertiesinstead; when empty, eachTestDiscoveryprovider falls back to its own built-in defaultsproperties- plugin-specific key/multi-value pairs forwarded verbatim to eachTestDiscoveryprovider; providers ignore keys they do not recogniseemitMetadata- whether to emit# key: valuemetadata comment lines before the CSV headermanualMode- manual AI workflow mode, ornullwhen using automated providersapplyTags- whentrue, AI-generated@DisplayNameand@Tagannotations are written back to the source files instead of producing a CSV/SARIF reportcontentHash- whentrue, a SHA-256 fingerprint of each class source is included as acontent_hashcolumn in CSV/plain output and as a SARIF propertyoverrideFile- path to a YAML classification override file, ornullwhen no override file is configured; overrides are applied after AI classification (or in place of it in static mode) and persist human corrections across re-runssecurityOnly- whentrue, only methods classified as security-relevant (via AI or override) are emitted; methods without an AI suggestion or whose suggestion hassecurityRelevant=falseare silently dropped from the output; this flag is set automatically whenOutputMode.SARIFis selected unless-include-non-securityis supplied, because SARIF is consumed by security tooling that expects findings, not a full inventoryaiCacheFile- path to a MethodAtlas CSV produced by a previous scan with-content-hash -ai; when present, classes whosecontent_hashmatches an entry in that file are classified from the cache instead of calling the AI provider;nullwhen no cache is configureddriftDetect- whentrue, atag_ai_driftcolumn is added to CSV/plain output comparing the source-level@Tag("security")annotation against the AI security-relevance classification; values arenone,tag-only, orai-only; SARIF and GitHub Annotations always include drift when AI is enabled regardless of this flagapplyTagsFromCsvFile- path to a CSV file used as input for the-apply-tags-from-csvmode;nullwhen the mode is not activemismatchLimit- maximum number of mismatches allowed before the apply-tags-from-csv operation is aborted;-1means no limit is enforcedemitSourceRoot- whentrue, asource_rootcolumn is added to CSV output and aSRCROOT=token is added to plain-text output, identifying which scan root each record originated from; useful in multi-root projects where the same fully qualified class name can appear under different source trees (e.g. module-a and module-b each containcom.acme.FooTest); has no effect on SARIF or GitHub Annotations outputsarifOmitScores- whentrue, the interaction score and confidence percentage are omitted from SARIF result message text; use this when the consuming system already renders thepropertiesbag and the extra text in the message is unwanted; default isfalse(scores are embedded in messages so they are visible in GitHub Code Scanning and similar tooling that does not render the properties bag)
public record CliConfig(OutputMode outputMode, AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String,List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores)
extends Record
Parsed command-line configuration used to drive a single application run.
Instances are created by CliArgs.parse(String...) and consumed by
MethodAtlasApp.run(String[], java.io.PrintWriter).
-
Constructor Summary
ConstructorsConstructorDescriptionCliConfig(OutputMode outputMode, AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String, List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores) Creates an instance of aCliConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaiCacheFilerecord component.Returns the value of theaiOptionsrecord component.booleanReturns the value of theapplyTagsrecord component.Returns the value of theapplyTagsFromCsvFilerecord component.booleanReturns the value of thecontentHashrecord component.booleanReturns the value of thedriftDetectrecord component.booleanReturns the value of theemitMetadatarecord component.booleanReturns the value of theemitSourceRootrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileSuffixesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themanualModerecord component.intReturns the value of themismatchLimitrecord component.Returns the value of theoutputModerecord component.Returns the value of theoverrideFilerecord component.paths()Returns the value of thepathsrecord component.Returns the value of thepropertiesrecord component.booleanReturns the value of thesarifOmitScoresrecord component.booleanReturns the value of thesecurityOnlyrecord component.Returns the value of thetestMarkersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CliConfig
public CliConfig(OutputMode outputMode, AiOptions aiOptions, List<Path> paths, List<String> fileSuffixes, Set<String> testMarkers, Map<String, List<String>> properties, boolean emitMetadata, ManualMode manualMode, boolean applyTags, boolean contentHash, Path overrideFile, boolean securityOnly, Path aiCacheFile, boolean driftDetect, Path applyTagsFromCsvFile, int mismatchLimit, boolean emitSourceRoot, boolean sarifOmitScores) Creates an instance of aCliConfigrecord class.- Parameters:
outputMode- the value for theoutputModerecord componentaiOptions- the value for theaiOptionsrecord componentpaths- the value for thepathsrecord componentfileSuffixes- the value for thefileSuffixesrecord componenttestMarkers- the value for thetestMarkersrecord componentproperties- the value for thepropertiesrecord componentemitMetadata- the value for theemitMetadatarecord componentmanualMode- the value for themanualModerecord componentapplyTags- the value for theapplyTagsrecord componentcontentHash- the value for thecontentHashrecord componentoverrideFile- the value for theoverrideFilerecord componentsecurityOnly- the value for thesecurityOnlyrecord componentaiCacheFile- the value for theaiCacheFilerecord componentdriftDetect- the value for thedriftDetectrecord componentapplyTagsFromCsvFile- the value for theapplyTagsFromCsvFilerecord componentmismatchLimit- the value for themismatchLimitrecord componentemitSourceRoot- the value for theemitSourceRootrecord componentsarifOmitScores- the value for thesarifOmitScoresrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
outputMode
Returns the value of theoutputModerecord component.- Returns:
- the value of the
outputModerecord component
-
aiOptions
Returns the value of theaiOptionsrecord component.- Returns:
- the value of the
aiOptionsrecord component
-
paths
Returns the value of thepathsrecord component.- Returns:
- the value of the
pathsrecord component
-
fileSuffixes
Returns the value of thefileSuffixesrecord component.- Returns:
- the value of the
fileSuffixesrecord component
-
testMarkers
Returns the value of thetestMarkersrecord component.- Returns:
- the value of the
testMarkersrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
emitMetadata
public boolean emitMetadata()Returns the value of theemitMetadatarecord component.- Returns:
- the value of the
emitMetadatarecord component
-
manualMode
Returns the value of themanualModerecord component.- Returns:
- the value of the
manualModerecord component
-
applyTags
public boolean applyTags()Returns the value of theapplyTagsrecord component.- Returns:
- the value of the
applyTagsrecord component
-
contentHash
public boolean contentHash()Returns the value of thecontentHashrecord component.- Returns:
- the value of the
contentHashrecord component
-
overrideFile
Returns the value of theoverrideFilerecord component.- Returns:
- the value of the
overrideFilerecord component
-
securityOnly
public boolean securityOnly()Returns the value of thesecurityOnlyrecord component.- Returns:
- the value of the
securityOnlyrecord component
-
aiCacheFile
Returns the value of theaiCacheFilerecord component.- Returns:
- the value of the
aiCacheFilerecord component
-
driftDetect
public boolean driftDetect()Returns the value of thedriftDetectrecord component.- Returns:
- the value of the
driftDetectrecord component
-
applyTagsFromCsvFile
Returns the value of theapplyTagsFromCsvFilerecord component.- Returns:
- the value of the
applyTagsFromCsvFilerecord component
-
mismatchLimit
public int mismatchLimit()Returns the value of themismatchLimitrecord component.- Returns:
- the value of the
mismatchLimitrecord component
-
emitSourceRoot
public boolean emitSourceRoot()Returns the value of theemitSourceRootrecord component.- Returns:
- the value of the
emitSourceRootrecord component
-
sarifOmitScores
public boolean sarifOmitScores()Returns the value of thesarifOmitScoresrecord component.- Returns:
- the value of the
sarifOmitScoresrecord component
-