Record Class CliConfig

java.lang.Object
java.lang.Record
org.egothor.methodatlas.CliConfig
Record Components:
outputMode - selected output mode
aiOptions - AI configuration controlling provider selection, taxonomy, limits, and timeouts
paths - root paths to scan; when empty, the current working directory is scanned
fileSuffixes - 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 suffixes
testMarkers - 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 via properties instead; when empty, each TestDiscovery provider falls back to its own built-in defaults
properties - plugin-specific key/multi-value pairs forwarded verbatim to each TestDiscovery provider; providers ignore keys they do not recognise
emitMetadata - whether to emit # key: value metadata comment lines before the CSV header
manualMode - manual AI workflow mode, or null when using automated providers
applyTags - when true, AI-generated @DisplayName and @Tag annotations are written back to the source files instead of producing a CSV/SARIF report
contentHash - when true, a SHA-256 fingerprint of each class source is included as a content_hash column in CSV/plain output and as a SARIF property
overrideFile - path to a YAML classification override file, or null when 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-runs
securityOnly - when true, only methods classified as security-relevant (via AI or override) are emitted; methods without an AI suggestion or whose suggestion has securityRelevant=false are silently dropped from the output; this flag is set automatically when OutputMode.SARIF is selected unless -include-non-security is supplied, because SARIF is consumed by security tooling that expects findings, not a full inventory
aiCacheFile - path to a MethodAtlas CSV produced by a previous scan with -content-hash -ai; when present, classes whose content_hash matches an entry in that file are classified from the cache instead of calling the AI provider; null when no cache is configured
driftDetect - when true, a tag_ai_drift column is added to CSV/plain output comparing the source-level @Tag("security") annotation against the AI security-relevance classification; values are none, tag-only, or ai-only; SARIF and GitHub Annotations always include drift when AI is enabled regardless of this flag
applyTagsFromCsvFile - path to a CSV file used as input for the -apply-tags-from-csv mode; null when the mode is not active
mismatchLimit - maximum number of mismatches allowed before the apply-tags-from-csv operation is aborted; -1 means no limit is enforced
emitSourceRoot - when true, a source_root column is added to CSV output and a SRCROOT= 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 contain com.acme.FooTest); has no effect on SARIF or GitHub Annotations output
sarifOmitScores - when true, the interaction score and confidence percentage are omitted from SARIF result message text; use this when the consuming system already renders the properties bag and the extra text in the message is unwanted; default is false (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 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 a CliConfig record class.
      Parameters:
      outputMode - the value for the outputMode record component
      aiOptions - the value for the aiOptions record component
      paths - the value for the paths record component
      fileSuffixes - the value for the fileSuffixes record component
      testMarkers - the value for the testMarkers record component
      properties - the value for the properties record component
      emitMetadata - the value for the emitMetadata record component
      manualMode - the value for the manualMode record component
      applyTags - the value for the applyTags record component
      contentHash - the value for the contentHash record component
      overrideFile - the value for the overrideFile record component
      securityOnly - the value for the securityOnly record component
      aiCacheFile - the value for the aiCacheFile record component
      driftDetect - the value for the driftDetect record component
      applyTagsFromCsvFile - the value for the applyTagsFromCsvFile record component
      mismatchLimit - the value for the mismatchLimit record component
      emitSourceRoot - the value for the emitSourceRoot record component
      sarifOmitScores - the value for the sarifOmitScores record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • outputMode

      public OutputMode outputMode()
      Returns the value of the outputMode record component.
      Returns:
      the value of the outputMode record component
    • aiOptions

      public AiOptions aiOptions()
      Returns the value of the aiOptions record component.
      Returns:
      the value of the aiOptions record component
    • paths

      public List<Path> paths()
      Returns the value of the paths record component.
      Returns:
      the value of the paths record component
    • fileSuffixes

      public List<String> fileSuffixes()
      Returns the value of the fileSuffixes record component.
      Returns:
      the value of the fileSuffixes record component
    • testMarkers

      public Set<String> testMarkers()
      Returns the value of the testMarkers record component.
      Returns:
      the value of the testMarkers record component
    • properties

      public Map<String,List<String>> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • emitMetadata

      public boolean emitMetadata()
      Returns the value of the emitMetadata record component.
      Returns:
      the value of the emitMetadata record component
    • manualMode

      public ManualMode manualMode()
      Returns the value of the manualMode record component.
      Returns:
      the value of the manualMode record component
    • applyTags

      public boolean applyTags()
      Returns the value of the applyTags record component.
      Returns:
      the value of the applyTags record component
    • contentHash

      public boolean contentHash()
      Returns the value of the contentHash record component.
      Returns:
      the value of the contentHash record component
    • overrideFile

      public Path overrideFile()
      Returns the value of the overrideFile record component.
      Returns:
      the value of the overrideFile record component
    • securityOnly

      public boolean securityOnly()
      Returns the value of the securityOnly record component.
      Returns:
      the value of the securityOnly record component
    • aiCacheFile

      public Path aiCacheFile()
      Returns the value of the aiCacheFile record component.
      Returns:
      the value of the aiCacheFile record component
    • driftDetect

      public boolean driftDetect()
      Returns the value of the driftDetect record component.
      Returns:
      the value of the driftDetect record component
    • applyTagsFromCsvFile

      public Path applyTagsFromCsvFile()
      Returns the value of the applyTagsFromCsvFile record component.
      Returns:
      the value of the applyTagsFromCsvFile record component
    • mismatchLimit

      public int mismatchLimit()
      Returns the value of the mismatchLimit record component.
      Returns:
      the value of the mismatchLimit record component
    • emitSourceRoot

      public boolean emitSourceRoot()
      Returns the value of the emitSourceRoot record component.
      Returns:
      the value of the emitSourceRoot record component
    • sarifOmitScores

      public boolean sarifOmitScores()
      Returns the value of the sarifOmitScores record component.
      Returns:
      the value of the sarifOmitScores record component