Skip to content

Commit

Permalink
chore: Stop lint on generated code (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrobayna authored Aug 3, 2023
1 parent 525d012 commit 0ffc920
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 35 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ updates:
directory: /
schedule:
interval: weekly

- package-ecosystem: gomod
directory: /
schedule:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: build

permissions: {} # no need any permissions

on:
push:
branches: [main]
Expand All @@ -10,7 +8,6 @@ on:
schedule:
- cron: '0 10 * * 1' # run "At 10:00 on Monday"
workflow_call:

jobs:
run:
name: Build
Expand All @@ -21,46 +18,35 @@ jobs:
matrix:
# There's currently an issue with 1.20.6 and testcontainers
go: ['1.20.5']

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true

- name: Go Format
run: gofmt -s -w . && git diff --exit-code

- name: Go Vet
run: go vet ./...

- name: Go Tidy
run: go mod tidy && git diff --exit-code

- name: Go Mod
run: go mod download

- name: Go Mod Verify
run: go mod verify

- name: Go Build
run: make build

- name: Go Test
run: make test

- name: Upload Coverage
uses: codecov/codecov-action@v3
continue-on-error: true
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./cover.profile
fail_ci_if_error: false

- name: Test Summary
uses: test-summary/action@v2
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
name: lint

permissions: {} # no need any permissions

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:

jobs:
run:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
check-latest: true

- name: Lint
uses: golangci/[email protected]
with:
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/vuln.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: vuln

permissions: {} # no need any permissions

on:
push:
branches: [main]
Expand All @@ -10,27 +8,22 @@ on:
schedule:
- cron: '0 10 * * 1' # run "At 10:00 on Monday"
workflow_call:

jobs:
run:
name: Vuln
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
check-latest: true

- name: Checkout
uses: actions/checkout@v3

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: Run govulncheck
run: govulncheck -test ./...
8 changes: 6 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ linters:
- unparam
- usestdlibvars
- wastedassign


run:
skip-dirs:
- gen
- slack/slackclient/mock_slackclient
skip-files:
- slack/slackclient/client_interface.go
linters-settings:
errorlint:
errorf: true
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ lint:

.PHONY: lint-fix
lint-fix:
gofumpt -l -w .
$(LINT_COMMAND) --fix

.PHONY: install
Expand Down
3 changes: 1 addition & 2 deletions slack/slackclient/client_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0ffc920

Please sign in to comment.