Skip to content

Commit bd12537

Browse files
authored
Process improvements (#1316)
* Add default linters and bump golangci-lint version * More aggressive policy
1 parent ff98fc4 commit bd12537

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.github/workflows/close-inactive-issues.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
close-issues:
88
runs-on: ubuntu-latest
99
env:
10-
PR_DAYS_BEFORE_STALE: 60
11-
PR_DAYS_BEFORE_CLOSE: 120
10+
PR_DAYS_BEFORE_STALE: 30
11+
PR_DAYS_BEFORE_CLOSE: 60
1212
PR_STALE_LABEL: stale
1313
permissions:
1414
issues: write
@@ -21,8 +21,8 @@ jobs:
2121
stale-issue-label: ${{ env.PR_STALE_LABEL }}
2222
stale-issue-message: "This issue is stale because it has been open for ${{ env.PR_DAYS_BEFORE_STALE }} days with no activity. Leave a comment to avoid closing this issue in ${{ env.PR_DAYS_BEFORE_CLOSE }} days."
2323
close-issue-message: "This issue was closed because it has been inactive for ${{ env.PR_DAYS_BEFORE_CLOSE }} days since being marked as stale."
24-
days-before-pr-stale: -1
25-
days-before-pr-close: -1
24+
days-before-pr-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
25+
days-before-pr-close: ${{ env.PR_DAYS_BEFORE_STALE }}
2626
# Start with the oldest items first
2727
ascending: true
2828
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: golangci-lint
2121
uses: golangci/golangci-lint-action@v8
2222
with:
23-
version: v2.1
23+
version: v2.5

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ linters:
1111
- misspell
1212
- nakedret
1313
- revive
14+
- errcheck
15+
- staticcheck
16+
- govet
17+
- ineffassign
18+
- unused
1419
exclusions:
1520
generated: lax
1621
presets:

script/lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gofmt -s -w .
55

66
BINDIR="$(git rev-parse --show-toplevel)"/bin
77
BINARY=$BINDIR/golangci-lint
8-
GOLANGCI_LINT_VERSION=v2.2.1
8+
GOLANGCI_LINT_VERSION=v2.5.0
99

1010
if [ ! -f "$BINARY" ]; then
1111
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "$GOLANGCI_LINT_VERSION"

0 commit comments

Comments
 (0)