|
81 | 81 | env: |
82 | 82 | GOFLAGS: "" |
83 | 83 |
|
84 | | -<<<<<<< HEAD |
85 | 84 | - name: Run golangci-lint |
86 | 85 | uses: golangci/golangci-lint-action@v9 |
87 | 86 | with: |
88 | 87 | version: v2.4 |
89 | | -======= |
90 | | - - name: Install golangci-lint |
91 | | - run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.0 |
92 | | - env: |
93 | | - GOFLAGS: "" |
94 | | - |
95 | | - - name: Build custom golangci-lint with plugins |
96 | | - if: github.event.pull_request.head.repo.full_name == github.repository |
97 | | - run: golangci-lint custom |
98 | | - env: |
99 | | - GOFLAGS: "" |
100 | | - |
101 | | - - name: Run golangci-lint (with custom linters) |
102 | | - if: github.event.pull_request.head.repo.full_name == github.repository |
103 | | - run: ./tools/golangci-lint run --timeout 15m -- ./... |
104 | | - |
105 | | - - name: Generate config without custom linters (fork PRs) |
106 | | - if: github.event.pull_request.head.repo.full_name != github.repository |
107 | | - run: | |
108 | | - # Remove custom plugin definitions and their enable/exclusion entries |
109 | | - # so stock golangci-lint can run without the compiled plugin binary. |
110 | | - CUSTOM_LINTERS=$(yq '.linters.settings.custom | keys | .[]' .golangci.yml) |
111 | | - cp .golangci.yml .golangci-fork.yml |
112 | | - for linter in $CUSTOM_LINTERS; do |
113 | | - yq -i "del(.linters.settings.custom.\"$linter\")" .golangci-fork.yml |
114 | | - yq -i ".linters.enable -= [\"$linter\"]" .golangci-fork.yml |
115 | | - yq -i "del(.linters.exclusions.rules[] | select(.linters[] == \"$linter\"))" .golangci-fork.yml |
116 | | - done |
117 | | -
|
118 | | - - name: Run golangci-lint (fork PRs, without custom linters) |
119 | | - if: github.event.pull_request.head.repo.full_name != github.repository |
120 | | - run: golangci-lint run --timeout 15m --config .golangci-fork.yml -- ./... |
121 | | ->>>>>>> 1499106e9 (ENGPLAT-399 Add --secure flag for TLS verification (#3781)) |
0 commit comments