You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: messages/config-command.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,33 +12,33 @@ We're continually improving Salesforce Code Analyzer. Tell us what you think! Gi
12
12
13
13
# command.examples
14
14
15
-
- 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:
15
+
- 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; and automatically apply any existing custom configuration settings found in a `code-analyzer.yml` or `code-analyzer.yaml` file in the current folder:
16
16
17
17
<%= config.bin %> <%= command.id %>
18
18
19
19
- This example is identical to the previous one, assuming that `./code-analyzer.yml` exists in your current folder.
<%= config.bin %> <%= command.id %> --config-file ./code-analyzer.yml --rule-selector all
22
22
23
23
- Write the current state of configuration to the file `code-analyzer.yml`, including any configuration from an existing `code-analyzer.yml` file. The command preserves all values from the original config, but overwrites any comments:
- Load an existing configuration file called `existing-config.yml`, and then write the configuration to a new file called `new-config.yml`, the configuration state that is applicable to all rules that are relevant to the workspace located in the current folder:
@@ -62,9 +62,9 @@ Use the --rule-selector flag to display only the configuration associated with t
62
62
63
63
You can combine different criteria using colons to further filter the list; the colon works as an intersection. For example, "--rule-selector eslint:Security" reduces the output to only contain the configuration state associated with the rules from the "eslint" engine that have the "Security" tag. To add multiple rule selectors together (a union), specify the --rule-selector flag multiple times, such as "--rule-selector eslint:Recommended --rule-selector retire-js:3".
64
64
65
-
If you don't specify this flag, then the command uses the "Recommended" tag rule selector.
65
+
If you don't specify this flag, then the command uses the "all" rule selector.
66
66
67
-
Run `<%= config.bin %> <%= command.id %> --rule-selector all` to display the configuration state associated with all possible rules available, and not just the recommended ones.
67
+
Run `<%= config.bin %> <%= command.id %> --rule-selector Recommended` to display the configuration state associated with just the 'Recommended' rules, instead of all the rules.
- List the details about all rules for all engines; also write the rules in JSON format to a file called "rules.json" in the "out" folder, which must already exist:
36
36
37
-
<%= config.bin %> <%= command.id %> --rule-selector all
- Get a more accurate list of the rules that apply specifically to your workspace (all the files in the current folder):
40
40
@@ -102,4 +102,16 @@ Format to display the rules in the terminal.
102
102
103
103
# flags.view.description
104
104
105
-
The format `table` is concise and shows minimal output, the format `detail` shows all available information.
105
+
The format `table` is concise and shows minimal output, the format `detail` shows all available information.
106
+
107
+
If you specify neither --view nor --output-file, then the default table view is shown. If you specify --output-file but not --view, only summary information is shown in the terminal.
108
+
109
+
# flags.output-file.summary
110
+
111
+
Name of the file where the selected rules are written. The file format depends on the extension you specify; currently, only .json is supported for JSON-formatted output.
112
+
113
+
# flags.output-file.description
114
+
115
+
If you specify a folder, such as "--output-file ./out/rules.json", the folder must already exist or you get an error. If the file already exists, it's overwritten without prompting.
116
+
117
+
If you don't specify this flag, the command outputs the rules to only the terminal.
Copy file name to clipboardExpand all lines: messages/run-command.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,20 +126,23 @@ If you specify neither --view nor --output-file, then the default table view is
126
126
127
127
# flags.output-file.summary
128
128
129
-
Output file that contains the analysis results. The file format depends on the extension you specify, such as .csv, .html, .xml, and so on.
129
+
Name of the file where the analysis results are written. The file format depends on the extension you specify, such as .csv, .html, .xml, and so on.
130
130
131
131
# flags.output-file.description
132
132
133
-
If you don't specify this flag, the command outputs the results in the terminal. Use this flag to print the results to a file; the format of the results depends on the extension you provide. For example, "--output-file results.csv" creates a comma-separated values file. You can specify one of these extensions:
133
+
If you don't specify this flag, the command outputs the results to only the terminal. Use this flag to print the results to a file; the format of the results depends on the extension you provide. For example, "--output-file results.csv" creates a comma-separated values file. You can specify one of these extensions:
134
134
135
135
- .csv
136
136
- .html or .htm
137
137
- .json
138
138
- .sarif or .sarif.json
139
139
- .xml
140
140
141
-
To output the results to multiple files, specify this flag multiple times. For example: "--output-file ./out/results.json --output-file ./out/report.html" creates a JSON results file and an HTML file in the "./out" folder.
141
+
To output the results to multiple files, specify this flag multiple times. For example: "--output-file results.json --output-file report.html" creates both a JSON results file and an HTML file.
142
+
143
+
If you specify 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.
0 commit comments