Skip to content

Commit 84301d4

Browse files
authored
Merge pull request #1919 from forcedotcom/release-5.6.0
RELEASE @W-19785605@ Conducting v5.6.0 release
2 parents 55dc52d + 348646e commit 84301d4

File tree

73 files changed

+8926
-10664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+8926
-10664
lines changed

.github/workflows/daily-smoke-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ jobs:
1212
# We run the daily smoke tests against 'dev' to validate that the code currently in development is still valid
1313
uses: ./.github/workflows/run-tests.yml
1414
with:
15-
node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: 'latest', artifact: 'latest'}]"
15+
# NOTE: We are temporarily hardcoding the `latest` version to 24.x, since 25.x is not yet supported in the CLI.
16+
node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: '24.x', artifact: 'latest'}]"
1617
target-branch: dev

bin/dev.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/env node_modules/.bin/ts-node
2-
// eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
3-
(async () => {
4-
const oclif = await import('@oclif/core')
5-
await oclif.execute({development: true, dir: __dirname})
6-
})()
1+
#!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
2+
3+
import { execute } from '@oclif/core';
4+
5+
await execute({ development: true, dir: import.meta.url });

bin/run.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env node
22

3-
// eslint-disable-next-line unicorn/prefer-top-level-await
4-
(async () => {
5-
const oclif = await import('@oclif/core')
6-
await oclif.execute({dir: __dirname})
7-
})()
3+
import {execute} from '@oclif/core'
4+
5+
await execute({dir: import.meta.url})

messages/config-command.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ We're continually improving Salesforce Code Analyzer. Tell us what you think! Gi
4040

4141
<%= config.bin %> <%= command.id %> --rule-selector eslint:no-undef
4242

43+
- Display any relevant configuration settings associated with PMD rules whose severity is 2 or 3:
44+
45+
<%= config.bin %> <%= command.id %> --rule-selector "pmd:(2,3)"
46+
4347
- 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:
4448

4549
<%= config.bin %> <%= command.id %> --config-file ./existing-config.yml --workspace . --output-file ./subfolder-config.yml
@@ -74,13 +78,13 @@ If you specify `--workspace` but not `--target`, then all the files within your
7478

7579
# flags.rule-selector.summary
7680

77-
Selection of rules, based on engine name, severity level, rule name, tag, or a combination of criteria separated by colons.
81+
Selection of rules, based on engine name, severity level, rule name, tag, or a combination of criteria separated by colons and commas, and grouped by parentheses.
7882

7983
# flags.rule-selector.description
8084

8185
Use the `--rule-selector` flag to display only the configuration associated with the rules based on specific criteria. You can select by engine, such as the rules associated with the "retire-js" or "eslint" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names.
8286

83-
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`.
87+
You can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector "pmd:(Performance,Security):2"` reduces the output to only contain the configuration state associated with PMD rules that have the Performance or Security tag and a severity of 2. You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes.
8488

8589
If you don't specify this flag, then the command uses the "all" rule selector.
8690

messages/rules-command.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ We're continually improving Salesforce Code Analyzer. Tell us what you think! Gi
4848

4949
<%= config.bin %> <%= command.id %> --rule-selector eslint:3 --rule-selector retire-js:Recommended
5050

51+
- List all the "pmd" engine rules that have a severity of moderate (3) or high (2) and the "Performance" tag.
52+
53+
<%= config.bin %> <%= command.id %> --rule-selector "pmd:(2,3):Performance"
54+
5155
- Similar to the previous example, but apply the rule overrides and engine settings from the configuration file called `code-analyzer2.yml` in the current folder. If, for example, you changed the severity of an "eslint" rule from moderate (3) to high (2) in the configuration file, then that rule isn't listed:
5256

5357
<%= config.bin %> <%= command.id %> --rule-selector eslint:3 --rule-selector retire-js:Recommended --config-file ./code-analyzer2.yml
@@ -96,7 +100,7 @@ Selection of rules, based on engine name, severity level, rule name, tag, or a c
96100

97101
Use the `--rule-selector` flag to select the list of rules based on specific criteria. For example, you can select by engine, such as the rules associated with the "retire-js" or "eslint" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names. Every rule has a name, which is unique within the scope of an engine. Most rules have tags, although it's not required. An example of a tag is "Recommended".
98102

99-
You can combine different criteria using colons to further filter the list; the colon works as an intersection. For example, `--rule-selector eslint:Security` lists rules associated only with the "eslint" engine that have the Security tag. The flag `--rule-selector eslint:Security:3` flag lists the "eslint" rules that have the Security tag and moderate severity (3). 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`.
103+
You can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector "pmd:(Performance,Security):2"` lists rules associated only with the "pmd" engine that have the Security or Performance tags and a high severity (2). You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes.
100104

101105
Run `<%= config.bin %> <%= command.id %> --rule-selector all` to list the possible values for engine name, rule name, tags, and severity levels that you can use with this flag.
102106

messages/run-command.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ We're continually improving Salesforce Code Analyzer. Tell us what you think! Gi
3636

3737
<%= config.bin %> <%= command.id %> --rule-selector all
3838

39+
- Analyze the files using only rules in the "pmd" engine with a severity of high (2) or moderate (3), and the "Performance" tag.
40+
41+
<%= config.bin %> <%= command.id %> --rule-selector "pmd:(2,3):Performance"
42+
3943
- Analyze files using the recommended "retire-js" rules; target all the files in the folder "./other-source" and only the Apex class files (extension .cls) in the folder "./force-app":
4044

4145
<%= config.bin %> <%= command.id %> --rule-selector retire-js:Recommended --target ./other-source --target ./force-app/**/*.cls
@@ -86,7 +90,7 @@ Selection of rules, based on engine name, severity level, rule name, tag, or a c
8690

8791
Use the `--rule-selector` flag to select the list of rules to run based on specific criteria. For example, you can select by engine, such as the rules associated with the "retire-js" or "eslint" engine. Or select by the severity of the rules, such as high or moderate. You can also select rules using tag values or rule names. Every rule has a name, which is unique within the scope of an engine. Most rules have tags, although it's not required. An example of a tag is "Recommended".
8892

89-
You can combine different criteria using colons to further filter the list; the colon works as an intersection. For example, `--rule-selector eslint:Security` runs rules associated only with the "eslint" engine that have the Security tag. The flag `--rule-selector eslint:Security:3` flag runs the "eslint" rules that have the Security tag and moderate severity (3). 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`.
93+
You can further filter the list by combining different criteria using colons to represent logical AND, commas to represent logical OR, and parentheses to create groupings. For example, `--rule-selector "pmd:(Performance,Security):2"` runs rules associated only with the "pmd" engine that have the Security or Performance tags and a high severity (2). You may also specify the flag multiple times to OR multiple selectors together. For example, `--rule-selector Performance,Security` is equivalent to `--rule-selector Performance --rule-selector Security`. Note that if you use parentheses in your selector, the selector should be wrapped in double-quotes.
9094

9195
Run `<%= config.bin %> code-analyzer rules --rule-selector all` to see the possible values for engine name, rule name, tags, and severity levels that you can use with this flag.
9296

0 commit comments

Comments
 (0)