- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 278
 
upgrade code analyzer to v5 #6386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
3a3a468
              a324d80
              b14795a
              15a3ce3
              736fec3
              4f74eea
              297dd0e
              172670a
              f24a244
              d0525ea
              041d0d2
              7bb138e
              7bc1af5
              e15bb77
              37086de
              9394321
              7eefddf
              f63376a
              107bb0b
              d04ae85
              afddb25
              6f1d5b6
              e5cb09b
              c0c6495
              a92768e
              9a955f5
              7ea6c41
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -401,7 +401,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # Linter install | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Renovate Config Mismatch in DocumentationDocumentation shows incorrect installation instructions. The renovate comment on line 403 still references  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Version mismatch: scanner version misdocumentedThe  Additional Locations (2) | 
||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -398,7 +398,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # Linter install | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Incorrect Package Reference in DocumentationDocumentation shows incorrect installation instructions. The renovate comment on line 400 still references  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Incorrect scanner version regression in plugin updaterThe   | 
||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -399,7 +399,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # Linter install | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Outdated Package Reference in DocumentationDocumentation shows incorrect installation instructions. The renovate comment on line 401 still references  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm trying to find why it is bumped to 5.5.0, if reverted back to adding a new key for the code-analyzer version of the linters. That version doesn't exist in sfdx scanner.  | 
||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -164,7 +164,7 @@ ARG REPOSITORY_TRIVY_VERSION=0.67.2 | |
| # renovate: datasource=github-tags depName=aquasecurity/trivy | ||
| ARG REPOSITORY_TRIVY_SBOM_VERSION=0.67.2 | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
                
       | 
||
| # renovate: datasource=pypi depName=snakemake | ||
| ARG PIP_SNAKEMAKE_VERSION=9.13.3 | ||
| # renovate: datasource=pypi depName=snakefmt | ||
| 
          
            
          
           | 
    @@ -493,7 +493,7 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel | |
| # Managed with COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ | ||
| # | ||
| # sfdx-scanner-apex installation | ||
| && sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| # | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -55,7 +55,7 @@ ARG NPM_SALESFORCE_PLUGIN_PACKAGING_VERSION=2.20.5 | |
| # renovate: datasource=npm depName=sfdx-hardis | ||
| ARG SFDX_HARDIS_VERSION=6.9.0 | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
                
       | 
||
| #ARG__END | ||
| 
     | 
||
| #################### | ||
| 
          
            
          
           | 
    @@ -179,7 +179,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # | ||
| # sfdx-scanner-apex installation | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| # | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -55,7 +55,7 @@ ARG NPM_SALESFORCE_PLUGIN_PACKAGING_VERSION=2.20.5 | |
| # renovate: datasource=npm depName=sfdx-hardis | ||
| ARG SFDX_HARDIS_VERSION=6.9.0 | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
                
       | 
||
| #ARG__END | ||
| 
     | 
||
| #################### | ||
| 
          
            
          
           | 
    @@ -179,7 +179,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # | ||
| # sfdx-scanner-aura installation | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| # | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -55,7 +55,7 @@ ARG NPM_SALESFORCE_PLUGIN_PACKAGING_VERSION=2.20.5 | |
| # renovate: datasource=npm depName=sfdx-hardis | ||
| ARG SFDX_HARDIS_VERSION=6.9.0 | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
                
       | 
||
| #ARG__END | ||
| 
     | 
||
| #################### | ||
| 
          
            
          
           | 
    @@ -179,7 +179,7 @@ RUN sf plugins install @salesforce/plugin-packaging@${NPM_SALESFORCE_PLUGIN_PACK | |
| ENV SF_AUTOUPDATE_DISABLE=true SF_CLI_DISABLE_AUTOUPDATE=true | ||
| # | ||
| # sfdx-scanner-lwc installation | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| # | ||
| 
          
            
          
           | 
    ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -64,39 +64,38 @@ linters: | |
| linter_spdx_license: BSD-3-Clause | ||
| config_file_name: apex-pmd-ruleset.xml | ||
| cli_executable: sf | ||
| cli_config_arg_name: "--pmdconfig" | ||
| cli_config_arg_name: "--config-file" | ||
| cli_lint_extra_args: | ||
| - "scanner:run" | ||
| - "--engine" | ||
| - "pmd" | ||
| - "--target" | ||
| - '"./**/*"' | ||
| - "--severity-threshold" | ||
| - "2" | ||
| - "--outfile" | ||
| - "{{REPORT_FOLDER}}/sfdx-scanner-report-apex.csv" | ||
| - "--format" | ||
| - "csv" | ||
| - "code-analyzer" | ||
| - "run" | ||
| - "--rule-selector" | ||
| - "pmd:Recommended" | ||
| - "--workspace" | ||
| - "." | ||
| - "--output-file" | ||
| - "{{REPORT_FOLDER}}/code-analyzer-report-apex.csv" | ||
| - "--view" | ||
| - "table" | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: CLI Lint Arguments Configuration Errorcli_lint_extra_args should have each argument on a separate line. According to PR discussion from @nvuillam: "it's one line by argument, so in that can you'll need - code-analyzer - run". The current configuration has "code-analyzer run" as a single entry, which should be split into two separate list entries: "- code-analyzer" and "- run".  | 
||
| cli_lint_mode: project | ||
| cli_help_extra_args: | ||
| - "scanner:run" | ||
| - "code-analyzer run" | ||
| cli_help_extra_commands: | ||
| - "sf scanner:rule:list" | ||
| - "sf code-analyzer rules" | ||
| cli_version_extra_args: | ||
| - "plugins" | ||
| - "plugins --core" | ||
| cli_version_arg_name: "" | ||
| version_extract_regex: "(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+" | ||
| version_extract_regex: "(?<=code-analyzer )\\d+(\\.\\d+)+" | ||
| cli_lint_errors_count: regex_sum | ||
| cli_lint_errors_regex: "found ([0-9]+) violation" | ||
| cli_lint_errors_regex: "severity: [1-3]" | ||
                
       | 
||
| examples: | ||
| - "sf scanner:run" | ||
| - "sf code-analyzer run --rule-selector pmd:Recommended --workspace . --output-file results.csv" | ||
| install: | ||
| dockerfile: | ||
| - |- | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| # renovate: datasource=npm depName=@salesforce/code-analyzer | ||
                
      
                  echoix marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| - |- | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| ide: | ||
| 
          
            
          
           | 
    @@ -151,37 +150,40 @@ linters: | |
| cli_config_arg_name: ".eslintrc-aura.json" | ||
| cli_executable: sf | ||
| cli_lint_extra_args: | ||
| - "scanner:run" | ||
| - "--engine" | ||
| - "code-analyzer" | ||
| - "run" | ||
| - "--rule-selector" | ||
| - "eslint" | ||
| - "--workspace" | ||
| - "." | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Aura Linter Uses Incorrect Rule SelectorThe   | 
||
| - "--target" | ||
| - "**/aura/**/*.js" | ||
| - "--severity-threshold" | ||
| - "2" | ||
| - "--outfile" | ||
| - "{{REPORT_FOLDER}}/sfdx-scanner-report-aura.csv" | ||
| - "--format" | ||
| - "csv" | ||
| - "--output-file" | ||
| - "{{REPORT_FOLDER}}/code-analyzer-report-aura.csv" | ||
| - "--view" | ||
| - "table" | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Salesforce Linter Argument Compatibility IssueThe Salesforce Aura and LWC linters mix  Additional Locations (1)There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: CLI Lint Arguments Configuration Errorcli_lint_extra_args should have each argument on a separate line. According to PR discussion from @nvuillam: "it's one line by argument, so in that can you'll need - code-analyzer - run". The current configuration has "code-analyzer run" as a single entry, which should be split into two separate list entries: "- code-analyzer" and "- run".  | 
||
| cli_lint_mode: project | ||
| cli_help_extra_args: | ||
| - "scanner:run" | ||
| - "code-analyzer run" | ||
                
       | 
||
| cli_help_extra_commands: | ||
| - "sf scanner:rule:list" | ||
| - "sf code-analyzer rules --rule-selector eslint" | ||
| cli_version_extra_args: | ||
| - "plugins" | ||
| - "plugins --core" | ||
| cli_version_arg_name: "" | ||
| version_extract_regex: "(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+" | ||
| version_extract_regex: "(?<=code-analyzer )\\d+(\\.\\d+)+" | ||
| cli_lint_errors_count: regex_sum | ||
| cli_lint_errors_regex: "found ([0-9]+) violation" | ||
| cli_lint_errors_regex: "severity: [1-3]" | ||
| examples: | ||
| - "sf scanner:run" | ||
| - "sf code-analyzer run --rule-selector eslint --workspace . --file-glob '**/aura/**/*.js' --output-file results.csv" | ||
| install: | ||
| dockerfile: | ||
| - |- | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| # renovate: datasource=npm depName=@salesforce/code-analyzer | ||
                
      
                  echoix marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| - |- | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| ide: | ||
| 
          
            
          
           | 
    @@ -227,37 +229,40 @@ linters: | |
| cli_config_arg_name: ".eslintrc-lwc.json" | ||
| cli_executable: sf | ||
| cli_lint_extra_args: | ||
| - "scanner:run" | ||
| - "--engine" | ||
| - "eslint-lwc" | ||
| - "code-analyzer" | ||
| - "run" | ||
| - "--rule-selector" | ||
| - "eslint:LWC" | ||
| - "--workspace" | ||
| - "." | ||
| - "--target" | ||
| - "**/lwc/**/*.js" | ||
| - "--severity-threshold" | ||
| - "2" | ||
| - "--outfile" | ||
| - "{{REPORT_FOLDER}}/sfdx-scanner-report-lwc.csv" | ||
| - "--format" | ||
| - "csv" | ||
| - "--output-file" | ||
| - "{{REPORT_FOLDER}}/code-analyzer-report-lwc.csv" | ||
| - "--view" | ||
| - "table" | ||
                
      
                  echoix marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| cli_lint_mode: project | ||
| cli_help_extra_args: | ||
| - "scanner:run" | ||
| - "code-analyzer run" | ||
| cli_help_extra_commands: | ||
| - "sf scanner:rule:list" | ||
| - "sf code-analyzer rules --rule-selector eslint:LWC" | ||
| cli_version_extra_args: | ||
| - "plugins" | ||
| - "plugins --core" | ||
| cli_version_arg_name: "" | ||
| version_extract_regex: "(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+" | ||
| version_extract_regex: "(?<=code-analyzer )\\d+(\\.\\d+)+" | ||
| cli_lint_errors_count: regex_sum | ||
| cli_lint_errors_regex: "found ([0-9]+) violation" | ||
| cli_lint_errors_regex: "severity: [1-3]" | ||
| examples: | ||
| - "sf scanner:run" | ||
| - "sf code-analyzer run --rule-selector eslint:LWC --workspace . --target '**/lwc/**/*.js' --output-file report.csv" | ||
| install: | ||
| dockerfile: | ||
| - |- | ||
| # renovate: datasource=npm depName=@salesforce/sfdx-scanner | ||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=4.12.0 | ||
| # renovate: datasource=npm depName=@salesforce/code-analyzer | ||
                
      
                  echoix marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| ARG SALESFORCE_SFDX_SCANNER_VERSION=5.5.0 | ||
| - |- | ||
| RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| RUN sf plugins install code-analyzer@${SALESFORCE_SFDX_SCANNER_VERSION} \ | ||
| && (npm cache clean --force || true) \ | ||
| && rm -rf /root/.npm/_cacache | ||
| ide: | ||
| 
          
            
          
           | 
    ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Duplicate ARG Declaration Causes Renovate Confusion
Duplicate ARG declaration for SALESFORCE_SFDX_SCANNER_VERSION. The variable is defined twice with the same value (5.5.0) but with different renovate datasource comments. The second declaration (line 343-344 with depName=@salesforce/code-analyzer) will override the first one (line 341-342 with depName=@salesforce/plugin-code-analyzer). This appears to be an error as renovate won't be able to track both packages, and it's unclear which package name is correct for version tracking.