This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (53 loc) · 1.97 KB
/
linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Lint Full Codebase
on: [ push ]
jobs:
golangci:
name: Go Linter
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Install deps # we indirectly rely on a go pkg that uses cgo thus need these deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libbtrfs-dev libdevmapper-dev
- name: Checkout code
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
with:
version: v1.50.1
args: -c=".github/linters/.golangci.yml"
super-linter:
name: Super Linter
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Run super-linter
uses: github/super-linter/slim@v4 # slim image has - 2gb and excludes support for languages we don't use
env:
VALIDATE_ALL_CODEBASE: false # only new or edited files. A broken change that has already been merged will not be picked up a second time!
FILTER_REGEX_EXCLUDE: vendor/*
# From docs: "If any one of the variables are set to true, we default to leaving any unset variable to false"
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true
VALIDATE_BASH: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
LINTER_RULES_PATH: .github/linters