Repository: runatlantis/atlantis (language: go)

Issue:
bug: golangci-lint job is failing in the PR Validation CI
<!--- Please keep this note for the community --->

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
* If you are interested in working on this issue or have submitted a pull request, please leave a comment.

<!--- Thank you for keeping this note for the community --->

---

### Overview of the Issue

Example job: https://github.com/runatlantis/atlantis/actions/runs/5705445160/job/15460111926?pr=3636

### Log

```
Running golangci-lint with reviewdog 🐶 ...
  /home/runner/work/_temp/reviewdog-gqNfIG/golangci-lint-1.53.3-linux-amd64/golangci-lint run --out-format line-number
  level=error msg="Running error: context loading failed: failed to load packages: timed out to load packages: context deadline exceeded"
  level=error msg="Timeout exceeded: try increasing it by passing --timeout option"
  /home/runner/work/_temp/reviewdog-gqNfIG/reviewdog -f=golangci-lint -name=golangci-lint -reporter=github-pr-check -filter-mode=added -fail-on-error=false -level=error
  reviewdog: This GitHub token doesn't have write permission of Review API [1], 
  so reviewdog will report results via logging command [2] and create annotations similar to
  github-pr-check reporter as a fallback.
  [1]: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target, 
  [2]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands
  reviewdog: Reporting results for "golangci-lint"
  reviewdog: No results found for "golangci-lint". 0 results found outside diff.
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/lint-required.yml b/.github/workflows/lint-required.yml
index 2e9a979f4a..6f5451f8d8 100644
--- a/.github/workflows/lint-required.yml
+++ b/.github/workflows/lint-required.yml
@@ -15,7 +15,9 @@ on:
     paths-ignore:
       - '**.go'
       - 'go.*'
-      - '.github/workflows/linter.yml'
+      - '.github/workflows/lint.yml'
+      - '.github/workflows/lint-required.yml'
+      - '.golangci.yml'
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -28,17 +30,3 @@ jobs:
     runs-on: ubuntu-22.04
     steps:
       - run: 'echo "No build required"'
-
-  revive:
-    if: github.event.pull_request.draft == false
-    name: runner / revive
-    runs-on: ubuntu-22.04
-    steps:
-      - run: 'echo "No build required"'
-
-  errcheck:
-    if: github.event.pull_request.draft == false
-    name: runner / errcheck
-    runs-on: ubuntu-22.04
-    steps:
-      - run: 'echo "No build required"'
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 38c5c359a0..8f35fba1d3 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -12,7 +12,8 @@ on:
     paths:
       - '**.go'
       - 'go.*'
-      - '.github/workflows/linter.yml'
+      - '.github/workflows/lint.yml'
+      - '.golangci.yml'
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -28,35 +29,4 @@ jobs:
     - name: golangci-lint
       uses: reviewdog/action-golangci-lint@v2
       with:
-        github_token: ${{ secrets.GITHUB_TOKEN }}
         tool_name: golangci-lint
-
-  # Use revive via golangci-lint binary with "warning" level.
-  revive:
-    if: github.event.pull_request.draft == false
-    name: runner / revive
-    runs-on: ubuntu-22.04
-    steps:
-      - name: Check out code into the Go module directory
-        uses: actions/checkout@v3
-      - name: revive
-        uses: reviewdog/action-golangci-lint@v2
-        with:
-          golangci_lint_flags: "--disable-all -E revive"
-          tool_name: revive # Change reporter name.
-          level: warning # GitHub Status Check won't become failure with this level.
-
-  # You can add more and more supported linters with different config.
-  errcheck:
-    if: github.event.pull_request.draft == false
-    name: runner / errcheck
-    runs-on: ubuntu-22.04
-    steps:
-      - name: Check out code into the Go module directory
-        uses: actions/checkout@v3
-      - name: errcheck
-        uses: reviewdog/action-golangci-lint@v2
-        with:
-          golangci_lint_flags: "--disable-all -E errcheck"
-          tool_name: errcheck
-          level: info
diff --git a/.golangci.yml b/.golangci.yml
index a55bc4497a..b6a224f249 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,6 +1,5 @@
 linters:
   enable:
-  - deadcode
   - errcheck
   - gochecknoinits
 # We don't use goconst because it gives false positives in the tests.
@@ -11,10 +10,10 @@ linters:
   - gosimple
   - ineffassign
   - staticcheck
-  - structcheck
   - typecheck
   - unconvert
   - unused
-  - varcheck
   - vet
   - vetshadow
+run:
+  timeout: 10m


Test patch: