dcc205386154ced0621589c8d529ac2044429272

Author
Ayman Bagabas <ayman.bagabas@gmail.com>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

Add lint workflow

Diff

 1diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..d37ac7941c651cc6b7947c5c9e86a71658b56e49
 4--- /dev/null
 5+++ b/.github/workflows/lint.yml
 6@@ -0,0 +1,18 @@
 7+name: lint
 8+on:
 9+  push:
10+  pull_request:
11+
12+jobs:
13+  golangci:
14+    name: lint
15+    runs-on: ubuntu-latest
16+    steps:
17+      - uses: actions/checkout@v2
18+      - name: golangci-lint
19+        uses: golangci/golangci-lint-action@v2
20+        with:
21+          # Optional: golangci-lint command line arguments.
22+          args: --issues-exit-code=0
23+          # Optional: show only new issues if it's a pull request. The default value is `false`.
24+          only-new-issues: true
25diff --git a/.golangci.yml b/.golangci.yml
26new file mode 100644
27index 0000000000000000000000000000000000000000..d3b12d1ff7f7a376fe538fec793e6329e9324431
28--- /dev/null
29+++ b/.golangci.yml
30@@ -0,0 +1,34 @@
31+run:
32+  tests: false
33+
34+issues:
35+  include:
36+    - EXC0001
37+    - EXC0005
38+    - EXC0011
39+    - EXC0012
40+    - EXC0013
41+
42+  max-issues-per-linter: 0
43+  max-same-issues: 0
44+
45+linters:
46+  enable:
47+    - bodyclose
48+    - dupl
49+    - exportloopref
50+    - goconst
51+    - godot
52+    - godox
53+    - goimports
54+    - goprintffuncname
55+    - gosec
56+    - ifshort
57+    - misspell
58+    - prealloc
59+    - revive
60+    - rowserrcheck
61+    - sqlclosecheck
62+    - unconvert
63+    - unparam
64+    - whitespace