Skip to content

Commit b80343e

Browse files
authored
chore(go-lint): [NOJIRA-1234] comment fix command (#152)
Changes the comment if linting issues are found so that: - `golangci-lint` fixes the issues found - uses the `main` branch as a reference so that only changes are inspected - includes GitHub PAT and initialises git so that private packages can be downloaded in the Docker container on demand
1 parent 99b2ee1 commit b80343e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

.github/workflows/go-lint-workflow.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,5 @@ jobs:
121121
122122
To run the linter locally, please, run this command:
123123
```
124-
docker run --rm \
125-
-v $PWD:/app:ro \
126-
-w /app \
127-
${{env.ECR_REGISTRY}}/golang-builder:latest lint-repository
124+
docker run --rm -e GITHUB_TOKEN -v $PWD:/app -w /app ${{env.ECR_REGISTRY}}/golang-builder:latest sh -c 'init-git && golangci-lint run --config /golangci.yaml --fix --new-from-rev main ./...'
128125
```

0 commit comments

Comments
 (0)