Skip to content

Commit

Permalink
.github: separate workflow for linting
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Zelinskie <jimmy@zelinskie.com>
  • Loading branch information
jzelinskie committed Oct 5, 2021
1 parent 39b64ef commit 95713e7
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 74 deletions.
64 changes: 64 additions & 0 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
output:
sort-results: true
linters-settings:
goimports:
local-prefixes: "github.com/authzed/spicedb"
rowserrcheck:
packages:
- "github.com/jmoiron/sqlx"
- "github.com/jackc/pgx"
linters:
enable:
- "deadcode"
- "errcheck"
- "gofumpt"
- "goimports"
- "gosimple"
- "govet"
- "ineffassign"
- "revive"
- "rowserrcheck"
- "staticcheck"
- "structcheck"
- "typecheck"
- "unused"
- "varcheck"
issues:
exclude-rules:
- path: "internal/dispatch"
linters:
- "revive"
- path: "internal/graph"
linters:
- "revive"
- path: "internal/namespace"
linters:
- "revive"
- path: "internal/testfixtures"
linters:
- "revive"
- path: "pkg/consistent"
linters:
- "revive"
- path: "pkg/graph"
linters:
- "revive"
- path: "pkg/membership"
linters:
- "revive"
- path: "pkg/migrate"
linters:
- "revive"
- path: "pkg/namespace"
linters:
- "revive"
- path: "pkg/schemadsl"
linters:
- "revive"
- path: "pkg/validation"
linters:
- "revive"
- text: "tx.Rollback()"
linters:
- "errcheck"
2 changes: 2 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
line-length: false
10 changes: 10 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# vim: ft=yaml
---
yaml-files:
- "*.yaml"
- "*.yml"
- ".yamllint"
extends: "default"
rules:
quoted-strings: "enable"
line-length: "disable"
21 changes: 21 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "Lint"
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
lint:
name: "Lint"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "github/super-linter/slim@v4"
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: "main"
LINTER_RULES_PATH: "/"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
64 changes: 0 additions & 64 deletions .golangci.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .golangci.yaml
1 change: 1 addition & 0 deletions .markdownlint.yaml
10 changes: 0 additions & 10 deletions .yamllint

This file was deleted.

1 change: 1 addition & 0 deletions .yamllint

0 comments on commit 95713e7

Please sign in to comment.