@@ -48,23 +48,31 @@ inputs:
4848 force-file-permissions :
4949 required : false
5050 description : " Force files to be readable by changing the permissions before running the analysis"
51+ gh-code-scanning-compat :
52+ required : false
53+ description : >-
54+ Reduce issue severity by one level, for non-security issues, for compatibility with GitHub's code scanning feature.
55+ This option will only have an effect when used in conjunction with '--format sarif'.
5156runs :
5257 using : " composite"
5358 steps :
59+ - name : " Set Codacy CLI version"
60+ shell : bash
61+ run : echo "CODACY_ANALYSIS_CLI_VERSION=4.0.0" >> $GITHUB_ENV
5462 - name : " Set script path environment variable"
5563 shell : bash
56- run : echo "::set-env name= CLI_SCRIPT_PATH:: ${{ github.action_path }}/codacy-analysis-cli.sh"
64+ run : echo "CLI_SCRIPT_PATH= ${{ github.action_path }}/codacy-analysis-cli.sh" >> $GITHUB_ENV
5765 - name : " Download Codacy CLI script"
5866 shell : bash
59- run : wget -O - https://raw.githubusercontent.com/codacy/codacy-analysis-cli/3.6.0 /bin/codacy-analysis-cli.sh > ${{ env.CLI_SCRIPT_PATH }}
67+ run : wget -O - https://raw.githubusercontent.com/codacy/codacy-analysis-cli/${{ env.CODACY_ANALYSIS_CLI_VERSION }} /bin/codacy-analysis-cli.sh > ${{ env.CLI_SCRIPT_PATH }}
6068 - name : " Change Codacy CLI script permissions"
6169 shell : bash
6270 run : chmod +x ${{ env.CLI_SCRIPT_PATH }}
6371 - name : " Run Codacy CLI"
6472 shell : bash
6573 run : >-
6674 ${{ env.CLI_SCRIPT_PATH }}
67- analyse
75+ analyze
6876 $(if [ ${{ inputs.verbose }} = true ]; then echo "--verbose"; fi)
6977 $(if [ ${{ inputs.project-token }} ]; then echo "--project-token ${{ inputs.project-token }}"; fi)
7078 $(if [ ${{ inputs.codacy-api-base-url }} ]; then echo "--codacy-api-base-url ${{ inputs.codacy-api-base-url }}"; fi)
7886 $(if [ ${{ inputs.upload }} = true ]; then echo "--upload"; fi)
7987 $(if [ ${{ inputs.fail-if-incomplete }} = true ]; then echo "--fail-if-incomplete"; fi)
8088 $(if [ ${{ inputs.allow-network }} = true ]; then echo "--allow-network"; fi)
81- $(if [ ${{ inputs.force-file-permissions }} = true ]; then echo "--force-file-permissions"; fi)
89+ $(if [ ${{ inputs.force-file-permissions }} = true ]; then echo "--force-file-permissions"; fi)
90+ $(if [ ${{ inputs.gh-code-scanning-compat }} = true ]; then echo "--gh-code-scanning-compat"; fi)
0 commit comments