Skip to content

Commit

Permalink
NEW: @W-17100389@: Add in feedback url to help text and log
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-carter-at-sf committed Nov 15, 2024
1 parent 2bbb76f commit c11ca62
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions messages/config-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Code Analyzer gives you the ability to configure settings that modify Code Analy

To apply a custom configuration with Code Analyzer, either keep your custom configuration settings in a `code-analyzer.yml` file located in the current folder from which you are executing commands, or specify the location of your custom configuration file to the Code Analyzer commands with the --config-file flag.

We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback.

# command.examples

- Display the current state of the Code Analyzer configuration using the default behavior: display top level configuration, display the engine and rule override settings associated with all the rules that have a "Recommended" tag; and automatically apply any existing custom configuration settings found in a `code-analyzer.yml` or `code-analyzer.yaml` file in the current folder:
Expand Down
4 changes: 2 additions & 2 deletions messages/path-start-util.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# error.glob-method-conflict

*DRAFT*: Path start point %s is invalid: When specifying a method with the #methodName syntax, glob patterns cannot be used.
Path start point %s is invalid: When specifying a method with the #methodName syntax, glob patterns cannot be used.

# error.negative-globs-unsupported

*DRAFT*: Path start point %s is invalid: Negative globs are unsupported.
Path start point %s is invalid: Negative globs are unsupported.
2 changes: 2 additions & 0 deletions messages/rules-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ You can also view details about the rules, such as the engine it's associated wi

Use this command to determine the exact set of rules to analyze your code. The `code-analyzer run` command has similar flags as this command, so once you've determined the flag values for this command that list the rules you want to run, you specify the same values to the `code-analyzer run` command.

We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback.

# command.examples

- List rules using the default behavior: include rules from all engines that have a "Recommended" tag; display the rules using concise table format; and automatically apply rule or engine overrides if a "code-analyzer.yml" or "code-analyzer.yaml" file exists in the current folder:
Expand Down
2 changes: 2 additions & 0 deletions messages/run-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ You can scan your codebase with the recommended rules. Or use flags to filter th

If you want to preview the list of rules before you actually run them, use the `code-analyzer rules` command, which also has the "--rules-selector", "--workspace", and "--config-file" flags that together define the list of rules to be run.

We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback.

# command.examples

- Analyze code using the default behavior: analyze the files in the current folder (default workspace) using the Recommended rules; display the output in the terminal with the concise table view; and automatically apply rule or engine overrides if a "code-analyzer.yml" or "code-analyzer.yaml" file exists in the current folder:
Expand Down
4 changes: 4 additions & 0 deletions messages/shared.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Developer Preview
# warning.command-state

This command is in %s.

# log.give-us-feedback

We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback.
2 changes: 1 addition & 1 deletion messages/workspace-util.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# error.negative-globs-unsupported

*DRAFT*: Workspace path %s is invalid: Negative globs are unsupported.
Workspace path %s is invalid: Negative globs are unsupported.
2 changes: 2 additions & 0 deletions src/lib/listeners/LogEventListener.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {CodeAnalyzer, EngineLogEvent, EventType, LogEvent, LogLevel} from '@salesforce/code-analyzer-core';
import {Display} from '../Display';
import {LogWriter} from '../writers/LogWriter';
import {BundleName, getMessage} from "../messages";

export interface LogEventListener {
listen(codeAnalyzer: CodeAnalyzer): void;
Expand Down Expand Up @@ -58,6 +59,7 @@ export class LogEventLogger implements LogEventListener {
}

public stopListening(): void {
this.logWriter.writeToLog('\n' + getMessage(BundleName.Shared, 'log.give-us-feedback'));
this.logWriter.closeLog();
}

Expand Down

0 comments on commit c11ca62

Please sign in to comment.