Class GitHubAnnotationsCommand

java.lang.Object
org.egothor.methodatlas.command.GitHubAnnotationsCommand
All Implemented Interfaces:
Command

public final class GitHubAnnotationsCommand extends Object implements Command
CLI command handler for the -github-annotations output mode.

Scans one or more source roots and emits GitHub Actions ::notice and ::warning workflow commands for security-relevant test methods.

See Also:
  • Constructor Details

    • GitHubAnnotationsCommand

      public GitHubAnnotationsCommand(CliConfig cliConfig, org.egothor.methodatlas.api.TestDiscoveryConfig discoveryConfig, AiSuggestionEngine aiEngine, ClassificationOverride override, AiResultCache aiCache)
      Creates a new GitHub Annotations command.
      Parameters:
      cliConfig - full parsed CLI configuration
      discoveryConfig - discovery configuration forwarded to providers
      aiEngine - AI engine providing suggestions; null when AI is disabled
      override - human classification overrides
      aiCache - AI result cache
  • Method Details

    • execute

      public int execute(PrintWriter out) throws IOException
      Scans all roots and emits GitHub Actions workflow commands.
      Specified by:
      execute in interface Command
      Parameters:
      out - writer that receives the workflow command lines
      Returns:
      0 if all files were processed successfully, 1 if any file produced a parse or processing error
      Throws:
      IOException - if traversing a file tree fails