Skip to content

Commit 19c9727

Browse files
authored
Merge pull request #232 from forcedotcom/release-1.6.0
RELEASE @W-18117811@ Conducting v1.6.0 release
2 parents d146e0a + 0f3c994 commit 19c9727

File tree

73 files changed

+5971
-3604
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

+5971
-3604
lines changed

.github/workflows/build-scanner-tarball.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ jobs:
2828
git clone -b ${{ inputs.target-branch }} https://github.com/forcedotcom/sfdx-scanner.git sfdx-scanner
2929
cd sfdx-scanner
3030
# Install and build dependencies.
31-
yarn
32-
yarn build
31+
if [[ "${{ inputs.target-branch}}" == "dev-4" ]]; then
32+
yarn
33+
yarn build
34+
else
35+
npm install
36+
npm run build
37+
fi
3338
# Create the tarball.
3439
npm pack
3540
# Upload the tarball as an artifact so it's usable elsewhere.

.github/workflows/validate-pr.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,21 @@ jobs:
2424
PR_INTO_DEV_OR_RELEASE_REGEX="^(FIX|CHANGE|NEW)([[:space:]]*\([^)]+\))?[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@.+"
2525
2626
# Validate PR title based on base_ref and head_ref
27-
if [[ "$base_ref" == "dev" && "${{ startsWith(github.head_ref, 'm2d/') }}" == "true" && ! "$title_upper" =~ $MAIN2DEV_REGEX ]]; then
28-
echo "::error::Invalid PR title: '$title'. Please follow the format: Main2Dev (__) @W-XXXXXXXX@ Merging.*\d+\.\d+\.\d+"
29-
exit 1
30-
elif [[ "$base_ref" == "main" && ! "$title_upper" =~ $RELEASE2MAIN_REGEX ]]; then
31-
echo "::error::Invalid PR title: '$title'. Please follow the format: RELEASE @W-XXXXXXXX@ Summary"
32-
exit 1
33-
elif [[ ("$base_ref" == "dev" || "${{ startsWith(github.base_ref, 'release-') }}" == "true") && ! "$title_upper" =~ $PR_INTO_DEV_OR_RELEASE_REGEX ]]; then
34-
echo "::error::Invalid PR title: '$title'. Please follow the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
35-
exit 1
27+
if [[ "$base_ref" == "dev" && "${{ startsWith(github.head_ref, 'm2d/') }}" == "true" ]]; then
28+
if [[ ! "$title_upper" =~ $MAIN2DEV_REGEX ]]; then
29+
echo "::error::Invalid PR title: '$title'. Please follow the format: Main2Dev (__) @W-XXXXXXXX@ Merging.*\d+\.\d+\.\d+"
30+
exit 1
31+
fi
32+
elif [[ "$base_ref" == "main" ]]; then
33+
if [[ ! "$title_upper" =~ $RELEASE2MAIN_REGEX ]]; then
34+
echo "::error::Invalid PR title: '$title'. Please follow the format: RELEASE @W-XXXXXXXX@ Summary"
35+
exit 1
36+
fi
37+
elif [[ "$base_ref" == "dev" || "${{ startsWith(github.base_ref, 'release-') }}" == "true" ]]; then
38+
if [[ ! "$title_upper" =~ $PR_INTO_DEV_OR_RELEASE_REGEX ]]; then
39+
echo "::error::Invalid PR title: '$title'. Please follow the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
40+
exit 1
41+
fi
3642
else
3743
echo "PR title '$title' automatically accepted for $base_ref branch."
3844
fi

SHA256.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ make sure that their SHA values match the values in the list below.
1515
shasum -a 256 <location_of_the_downloaded_file>
1616

1717
3. Confirm that the SHA in your output matches the value in this list of SHAs.
18-
b148099eb0950f4001441d6e527f5e0333ac48abf865dbc2b2089551071504df ./extensions/sfdx-code-analyzer-vscode-1.4.0.vsix
18+
8dbf73cb26d6dbc695b5d0fe0f901ab7cbf1fb834640713dfb717209c224474d ./extensions/sfdx-code-analyzer-vscode-1.5.1.vsix
1919
4. Change the filename extension for the file that you downloaded from .zip to
2020
.vsix.
2121

package-lock.json

Lines changed: 448 additions & 461 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"color": "#ECECEC",
1414
"theme": "light"
1515
},
16-
"version": "1.5.1",
16+
"version": "1.6.0",
1717
"publisher": "salesforce",
1818
"license": "BSD-3-Clause",
1919
"engines": {
@@ -35,15 +35,15 @@
3535
"@types/jest": "^29.5.14",
3636
"@types/semver": "^7.5.8",
3737
"@types/tmp": "^0.2.6",
38-
"cross-spawn": "^7.0.6",
38+
"diff": "^5.2.0",
3939
"glob": "^11.0.1",
4040
"semver": "^7.7.1",
4141
"tmp": "^0.2.3"
4242
},
4343
"devDependencies": {
4444
"@eslint/js": "^9.21.0",
45+
"@types/diff": "^5.2.0",
4546
"@types/chai": "^4.3.5",
46-
"@types/cross-spawn": "^6.0.2",
4747
"@types/mocha": "^10.0.1",
4848
"@types/node": "^22.13.6",
4949
"@types/sinon": "^10.0.15",
@@ -90,7 +90,10 @@
9090
"showcoverage-legacy": "open ./coverage/legacy/lcov-report/index.html"
9191
},
9292
"activationEvents": [
93-
"workspaceContains:sfdx-project.json"
93+
"workspaceContains:sfdx-project.json",
94+
"onLanguage:apex",
95+
"onLanguage:soql",
96+
"onLanguage:visualforce"
9497
],
9598
"main": "./out/extension.js",
9699
"contributes": {
@@ -132,11 +135,6 @@
132135
{
133136
"title": "General",
134137
"properties": {
135-
"codeAnalyzer.enableV5": {
136-
"type": "boolean",
137-
"default": false,
138-
"description": "Use Code Analyzer v5 (Beta) instead of Code Analyzer v4."
139-
},
140138
"codeAnalyzer.analyzeOnSave.enabled": {
141139
"type": "boolean",
142140
"default": false,
@@ -150,22 +148,32 @@
150148
"codeAnalyzer.apexGuru.enabled": {
151149
"type": "boolean",
152150
"default": false,
153-
"description": "Discover critical problems and performance issues in your Apex code with ApexGuru, which analyzes your Apex files for you. This feature is in a closed pilot; contact your account representative to learn more."
151+
"description": "(Pilot) Discover critical problems and performance issues in your Apex code with ApexGuru, which analyzes your Apex files for you. This feature is in a closed pilot; contact your account representative to learn more."
152+
},
153+
"codeAnalyzer.Use v4 (Deprecated)": {
154+
"type": "boolean",
155+
"default": false,
156+
"markdownDescription": "Use Code Analyzer v4 (Deprecated) instead of Code Analyzer v5.\n\nWe no longer support Code Analyzer v4 and will soon remove this setting. We highly recommend that you use [Code Analyzer v5](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/code-analyzer.html) instead. Selecting this setting ignores the Code Analyzer v5 settings and uses the v4 settings instead.\n\nIf you have having trouble switching to v5, create an [issue](https://github.com/forcedotcom/sfdx-code-analyzer-vscode/issues)."
154157
}
155158
}
156159
},
157160
{
158-
"title": "Code Analyzer v5 (Beta)",
161+
"title": "Code Analyzer v5",
159162
"properties": {
163+
"codeAnalyzer.configFile": {
164+
"type": "string",
165+
"default": "",
166+
"markdownDescription": "Path to a [Code Analyzer configuration file](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/config-custom.html) used to customize the engines and rules.\n\nCode Analyzer has an internal default configuration for its rule and engine properties. If you want to override these defaults, you can either add a 'code-analyzer.yml' or 'code-analyzer.yaml' file at the root of your project or explicitly specify your configuration file path with this setting.\n\nThis setting is equivalent to the `--config-file` flag of the CLI commands. See [configuration schema](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/config-toplevel.html)."
167+
},
160168
"codeAnalyzer.ruleSelectors": {
161169
"type": "string",
162170
"default": "Recommended",
163-
"markdownDescription": "Specifies the default set of rules to use when executing Code Analyzer v5 (Beta). Specify the rules using their name, engine name, severity level, tag, or a combination. Use commas for unions (such as \"Security,Performance\") and colons for intersections (such as \"pmd:Security\" or \"eslint:3\")."
171+
"markdownDescription": "Selection of rules used to scan your code with Code Analyzer v5.\n\nSelect rules using their name, engine name, severity level, tag, or a combination. Use commas for unions (such as \"Security,Performance\") and colons for intersections (such as \"pmd:Security\" or \"eslint:3\").\n\nThis setting is equivalent to the `--rule-selector` flag of the CLI commands. See [examples](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_code-analyzer_commands_unified.htm#cli_reference_code-analyzer_rules_unified)."
164172
}
165173
}
166174
},
167175
{
168-
"title": "Code Analyzer v4",
176+
"title": "Code Analyzer v4 (Deprecated)",
169177
"properties": {
170178
"codeAnalyzer.pMD.customConfigFile": {
171179
"type": "string",
@@ -217,7 +225,7 @@
217225
"commandPalette": [
218226
{
219227
"command": "sfca.runOnActiveFile",
220-
"when": "true"
228+
"when": "sfca.extensionActivated"
221229
},
222230
{
223231
"command": "sfca.runOnSelected",
@@ -229,11 +237,11 @@
229237
},
230238
{
231239
"command": "sfca.runDfa",
232-
"when": "sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled"
240+
"when": "sfca.extensionActivated && sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled"
233241
},
234242
{
235243
"command": "sfca.removeDiagnosticsOnActiveFile",
236-
"when": "true"
244+
"when": "sfca.extensionActivated"
237245
},
238246
{
239247
"command": "sfca.removeDiagnosticsOnSelectedFile",
@@ -245,39 +253,39 @@
245253
},
246254
{
247255
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
248-
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
256+
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
249257
}
250258
],
251259
"editor/context": [
252260
{
253261
"command": "sfca.runOnActiveFile",
254-
"when": "true"
262+
"when": "sfca.extensionActivated"
255263
},
256264
{
257265
"command": "sfca.runDfaOnSelectedMethod",
258-
"when": "sfca.codeAnalyzerV4Enabled"
266+
"when": "sfca.extensionActivated && sfca.codeAnalyzerV4Enabled"
259267
},
260268
{
261269
"command": "sfca.removeDiagnosticsOnActiveFile",
262-
"when": "true"
270+
"when": "sfca.extensionActivated"
263271
},
264272
{
265273
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
266-
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
274+
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
267275
}
268276
],
269277
"explorer/context": [
270278
{
271279
"command": "sfca.runOnSelected",
272-
"when": "true"
280+
"when": "sfca.extensionActivated"
273281
},
274282
{
275283
"command": "sfca.removeDiagnosticsOnSelectedFile",
276-
"when": "true"
284+
"when": "sfca.extensionActivated"
277285
},
278286
{
279287
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
280-
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
288+
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
281289
}
282290
]
283291
},

0 commit comments

Comments
 (0)