Skip to content

Commit

Permalink
Merge pull request #59 from codacy/fix/keep-changes-go-mod
Browse files Browse the repository at this point in the history
fix: Fix possible changes to users' go.mod files CY-4272
  • Loading branch information
Francisco Duarte committed May 11, 2021
2 parents 21691b3 + 1e61a71 commit 9d53f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ runs:
chmod +x /tmp/codacy-staticcheck
cd -
find . -type f -name go.mod -exec bash -c 'cd $(dirname $1); PKGS=$(go list ./...); git checkout $1; /tmp/staticcheck/staticcheck -f json $PKGS' _ {} \; > /tmp/staticcheck-out.json
find . -type f -name go.mod -exec bash -c 'cd $(dirname $1); cp $1 $1.codacy.bak; PKGS=$(go list ./...); /tmp/staticcheck/staticcheck -f json $PKGS; mv $1.codacy.bak $1' _ {} \; > /tmp/staticcheck-out.json
/tmp/codacy-staticcheck < /tmp/staticcheck-out.json > /tmp/codacy-out.json
if [ ${{ inputs.upload }} = true ]; then
curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \
Expand Down

0 comments on commit 9d53f2c

Please sign in to comment.