Skip to content

Commit 69deb2c

Browse files
committed
Run lint only in PR flow and use super-linter
1 parent 7d38479 commit 69deb2c

File tree

4 files changed

+33
-13
lines changed

4 files changed

+33
-13
lines changed

.golangci.yml renamed to .github/linters/.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ run:
33
timeout: 5m
44
linters:
55
disable-all: true
6-
fast: false
76
enable:
87
- gofmt
9-
- golint
8+
- revive
109
- goimports
10+
fast: false
1111
linters-settings:
1212
gofmt:
1313
simplify: false

.github/workflows/pr-lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "PR: Lint"
2+
3+
concurrency:
4+
group: pr-lint-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches: [ master, v3 ]
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@v2
20+
with:
21+
# Full git history is needed to get a proper list of changed files within `super-linter`
22+
fetch-depth: 0
23+
24+
- name: Lint Code Base
25+
uses: github/super-linter@v4
26+
env:
27+
VALIDATE_ALL_CODEBASE: false
28+
DEFAULT_BRANCH: master
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/testing.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,10 @@ on:
77
branches: [ master, v3 ]
88

99
jobs:
10-
lint:
11-
name: Lint
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Check out code
15-
uses: actions/checkout@v2
16-
- name: golangci-lint
17-
uses: golangci/golangci-lint-action@v2
18-
1910
test:
2011
name: Test
2112
runs-on: ubuntu-latest
22-
needs: [lint]
13+
needs: [ lint ]
2314

2415
services:
2516
postgres:

token_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func NewTokenStore(adapter pgAdapter.Adapter, options ...TokenStoreOption) (*Tok
6868
return store, err
6969
}
7070

71-
// Close close the store
71+
// Close closes the store
7272
func (s *TokenStore) Close() error {
7373
if !s.gcDisabled {
7474
s.ticker.Stop()

0 commit comments

Comments
 (0)