Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions messages/run-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ To output the results to multiple files, specify this flag multiple times. For e

If you specify a file within a folder, such as `--output-file ./out/results.json`, the folder must already exist, or you get an error. If the file already exists, it's overwritten without prompting.

<!-- sfge threading flags removed; configuration now lives purely in yaml -->

> **Note:** SFGE engine threading settings are no longer exposed as CLI
> flags. Please configure `engines.sfge.java_thread_count` and
> `engines.sfge.java_thread_timeout` in your `code-analyzer.yml`/`.yaml`
> file. The CLI will automatically pick up values from that file when it is
> present.
# error.invalid-severity-threshold

Expected --severity-threshold=%s to be one of: %s
Expand Down
12 changes: 10 additions & 2 deletions src/commands/code-analyzer/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ export default class RunCommand extends SfCommand<void> implements Displayable {
description: getMessage(BundleName.RunCommand, 'flags.config-file.description'),
char: 'c',
exists: true
})
}),
// === Flags pertaining to SFGE engine tuning ===
// NOTE: thread count/timeout are now configured via the YAML file
// (engines.sfge.java_thread_count / engines.sfge.java_thread_timeout) and
// are no longer exposed as CLI flags. Keeping the section around so the
// comment about configuration is still surfaced in help text.
};

public async run(): Promise<void> {
Expand All @@ -84,8 +89,11 @@ export default class RunCommand extends SfCommand<void> implements Displayable {
'workspace': parsedFlags['workspace'],
'severity-threshold': parsedFlags['severity-threshold'] === undefined ? undefined :
convertThresholdToEnum(parsedFlags['severity-threshold'].toLowerCase()),
'target': parsedFlags['target']
'target': parsedFlags['target']
};
// sfge threading parameters are controlled entirely through the config
// file now; the CLI used to accept overrides but those flags have been
// removed.
await action.execute(runInput);
}

Expand Down
5 changes: 4 additions & 1 deletion src/lib/actions/RunAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export type RunInput = {
'severity-threshold'?: SeverityLevel;
target?: string[];
workspace: string[];

}

export class RunAction {
Expand All @@ -51,6 +50,10 @@ export class RunAction {
}

public async execute(input: RunInput): Promise<void> {
// Threading configuration for the SFGE engine is now solely managed via the
// user’s YAML configuration file (engines.sfge.java_thread_count and
// engines.sfge.java_thread_timeout). CLI overrides were removed, so we
// simply forward the config file path to the factory.
const config: CodeAnalyzerConfig = this.dependencies.configFactory.create(input['config-file']);
const logWriter: LogFileWriter = await LogFileWriter.fromConfig(config);
this.dependencies.actionSummaryViewer.viewPreExecutionSummary(logWriter.getLogDestination());
Expand Down