Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
657756b
Updating SHA256.md after 1.5.0 release
svc-cli-bot Mar 25, 2025
bc7366b
FIX validate-pr.yml workflow
stephen-carter-at-sf Mar 25, 2025
d201e8e
Merge pull request #199 from forcedotcom/m2d/v1.5.0
stephen-carter-at-sf Mar 25, 2025
74c882b
FIX: @W-18120418@: Fix test timeout issues
stephen-carter-at-sf Mar 25, 2025
421cdd5
Merge pull request #200 from forcedotcom/sc/W-18097268
stephen-carter-at-sf Mar 25, 2025
2dcef87
FIX: @W-18120418@: Attempt #2 to fix test timeout issues
stephen-carter-at-sf Mar 26, 2025
4581150
Merge pull request #201 from forcedotcom/sc/FixTimeouts
stephen-carter-at-sf Mar 26, 2025
6dbd42e
CHANGE: @W-18097268@: Refactoring Diagnostics (#202)
stephen-carter-at-sf Mar 31, 2025
0ffb8b1
NEW: @W-18097268@: Diagnostics now respond to text document changes a…
stephen-carter-at-sf Mar 31, 2025
7c0cb22
FIX: @W-18097380@: Show violations that do not have file locations in…
stephen-carter-at-sf Apr 1, 2025
e640f40
NEW: @W-18161190@: Make v5 the default, add in config-file option, an…
stephen-carter-at-sf Apr 3, 2025
af91585
Updating SHA256.md after 1.5.1 release
svc-cli-bot Apr 4, 2025
a16d778
Merge branch 'dev' into m2d/v1.5.1
stephen-carter-at-sf Apr 4, 2025
fa1cf9d
Polishing up some of the code
stephen-carter-at-sf Apr 4, 2025
221cd29
Merge pull request #210 from forcedotcom/m2d/v1.5.1
stephen-carter-at-sf Apr 4, 2025
2cc9a18
CHANGE: @W-18097310@: Fix unified diff for a4d to use callbacks to be…
stephen-carter-at-sf Apr 7, 2025
e54c7f5
Merge pull request #211 from forcedotcom/sc/W-18097310
stephen-carter-at-sf Apr 8, 2025
a5500a8
FIX: @W-18229368@: Do not let partially overlaping diagnostics to swa…
stephen-carter-at-sf Apr 8, 2025
589389c
Merge pull request #213 from forcedotcom/sc/W-18229368
stephen-carter-at-sf Apr 8, 2025
6a7111e
NEW: @W-18230126@: Prevent our commands from being available until af…
stephen-carter-at-sf Apr 9, 2025
396c53c
FIX: @W-18236125@: Fix LSP based method selection by flattening symbo…
stephen-carter-at-sf Apr 9, 2025
e9b942b
NEW: @W-18235655@: Add in warn/error when editor.CodeLens is not enab…
stephen-carter-at-sf Apr 9, 2025
26f4c7b
CHANGE: @W-18246414@ Verify that diff can be shown before calling LLM…
stephen-carter-at-sf Apr 10, 2025
ed88874
CHANGE: @W-18097339@ Refactor to get CodeAnalyzer class accessible so…
stephen-carter-at-sf Apr 11, 2025
a0c8f39
CHANGE: @W-18270983@: Fetch rule description dynamically (#219)
stephen-carter-at-sf Apr 14, 2025
3c013c6
FIX: @W-18271001@: The Enable v5 button should update globally and re…
stephen-carter-at-sf Apr 15, 2025
3ae0762
CHANGE: @W-18271015@: Attempt to validate that CLI exists immediately…
stephen-carter-at-sf Apr 15, 2025
3c6722b
CHANGE @W-18289221@ Supporting npm-based scanner (#223)
jfeingold35 Apr 16, 2025
5015cba
CHANGE: @W-18238058@: Refactor to remove cross-spawn in favor of CliC…
stephen-carter-at-sf Apr 16, 2025
0a7053a
FIX: @W-18271015@: Catching errors appropriately during validation… (…
stephen-carter-at-sf Apr 17, 2025
41bcf38
NEW: @W-18238058@: Use --target flag for 5.0.0+ and add in lots of te…
stephen-carter-at-sf Apr 18, 2025
aac3a88
NEW: @W-18308504@ Polish first time v5 experience with uninstantiable…
randi274 Apr 22, 2025
0a046aa
CHANGE: @W-18097191@: Finalize A4D Quick Fix for GA (#228)
stephen-carter-at-sf Apr 22, 2025
bf97e7e
CHANGE: @W-18308504@: Give user control when to ignore setup error (#…
stephen-carter-at-sf Apr 22, 2025
0f3c994
Preparing for v1.6.0 release.
github-actions[bot] Apr 25, 2025
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
9 changes: 7 additions & 2 deletions .github/workflows/build-scanner-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ jobs:
git clone -b ${{ inputs.target-branch }} https://github.com/forcedotcom/sfdx-scanner.git sfdx-scanner
cd sfdx-scanner
# Install and build dependencies.
yarn
yarn build
if [[ "${{ inputs.target-branch}}" == "dev-4" ]]; then
yarn
yarn build
else
npm install
npm run build
fi
# Create the tarball.
npm pack
# Upload the tarball as an artifact so it's usable elsewhere.
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ jobs:
PR_INTO_DEV_OR_RELEASE_REGEX="^(FIX|CHANGE|NEW)([[:space:]]*\([^)]+\))?[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@.+"

# Validate PR title based on base_ref and head_ref
if [[ "$base_ref" == "dev" && "${{ startsWith(github.head_ref, 'm2d/') }}" == "true" && ! "$title_upper" =~ $MAIN2DEV_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: Main2Dev (__) @W-XXXXXXXX@ Merging.*\d+\.\d+\.\d+"
exit 1
elif [[ "$base_ref" == "main" && ! "$title_upper" =~ $RELEASE2MAIN_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: RELEASE @W-XXXXXXXX@ Summary"
exit 1
elif [[ ("$base_ref" == "dev" || "${{ startsWith(github.base_ref, 'release-') }}" == "true") && ! "$title_upper" =~ $PR_INTO_DEV_OR_RELEASE_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
exit 1
if [[ "$base_ref" == "dev" && "${{ startsWith(github.head_ref, 'm2d/') }}" == "true" ]]; then
if [[ ! "$title_upper" =~ $MAIN2DEV_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: Main2Dev (__) @W-XXXXXXXX@ Merging.*\d+\.\d+\.\d+"
exit 1
fi
elif [[ "$base_ref" == "main" ]]; then
if [[ ! "$title_upper" =~ $RELEASE2MAIN_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: RELEASE @W-XXXXXXXX@ Summary"
exit 1
fi
elif [[ "$base_ref" == "dev" || "${{ startsWith(github.base_ref, 'release-') }}" == "true" ]]; then
if [[ ! "$title_upper" =~ $PR_INTO_DEV_OR_RELEASE_REGEX ]]; then
echo "::error::Invalid PR title: '$title'. Please follow the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
exit 1
fi
else
echo "PR title '$title' automatically accepted for $base_ref branch."
fi
Expand Down
2 changes: 1 addition & 1 deletion SHA256.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ make sure that their SHA values match the values in the list below.
shasum -a 256 <location_of_the_downloaded_file>

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

Expand Down
909 changes: 448 additions & 461 deletions package-lock.json

Large diffs are not rendered by default.

56 changes: 32 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"color": "#ECECEC",
"theme": "light"
},
"version": "1.5.1",
"version": "1.6.0",
"publisher": "salesforce",
"license": "BSD-3-Clause",
"engines": {
Expand All @@ -35,15 +35,15 @@
"@types/jest": "^29.5.14",
"@types/semver": "^7.5.8",
"@types/tmp": "^0.2.6",
"cross-spawn": "^7.0.6",
"diff": "^5.2.0",
"glob": "^11.0.1",
"semver": "^7.7.1",
"tmp": "^0.2.3"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
"@types/diff": "^5.2.0",
"@types/chai": "^4.3.5",
"@types/cross-spawn": "^6.0.2",
"@types/mocha": "^10.0.1",
"@types/node": "^22.13.6",
"@types/sinon": "^10.0.15",
Expand Down Expand Up @@ -90,7 +90,10 @@
"showcoverage-legacy": "open ./coverage/legacy/lcov-report/index.html"
},
"activationEvents": [
"workspaceContains:sfdx-project.json"
"workspaceContains:sfdx-project.json",
"onLanguage:apex",
"onLanguage:soql",
"onLanguage:visualforce"
],
"main": "./out/extension.js",
"contributes": {
Expand Down Expand Up @@ -132,11 +135,6 @@
{
"title": "General",
"properties": {
"codeAnalyzer.enableV5": {
"type": "boolean",
"default": false,
"description": "Use Code Analyzer v5 (Beta) instead of Code Analyzer v4."
},
"codeAnalyzer.analyzeOnSave.enabled": {
"type": "boolean",
"default": false,
Expand All @@ -150,22 +148,32 @@
"codeAnalyzer.apexGuru.enabled": {
"type": "boolean",
"default": false,
"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."
"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."
},
"codeAnalyzer.Use v4 (Deprecated)": {
"type": "boolean",
"default": false,
"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)."
}
}
},
{
"title": "Code Analyzer v5 (Beta)",
"title": "Code Analyzer v5",
"properties": {
"codeAnalyzer.configFile": {
"type": "string",
"default": "",
"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)."
},
"codeAnalyzer.ruleSelectors": {
"type": "string",
"default": "Recommended",
"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\")."
"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)."
}
}
},
{
"title": "Code Analyzer v4",
"title": "Code Analyzer v4 (Deprecated)",
"properties": {
"codeAnalyzer.pMD.customConfigFile": {
"type": "string",
Expand Down Expand Up @@ -217,7 +225,7 @@
"commandPalette": [
{
"command": "sfca.runOnActiveFile",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runOnSelected",
Expand All @@ -229,11 +237,11 @@
},
{
"command": "sfca.runDfa",
"when": "sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled"
"when": "sfca.extensionActivated && sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
Expand All @@ -245,39 +253,39 @@
},
{
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
],
"editor/context": [
{
"command": "sfca.runOnActiveFile",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runDfaOnSelectedMethod",
"when": "sfca.codeAnalyzerV4Enabled"
"when": "sfca.extensionActivated && sfca.codeAnalyzerV4Enabled"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
],
"explorer/context": [
{
"command": "sfca.runOnSelected",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"when": "true"
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
"when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
]
},
Expand Down
Loading