Skip to content

Commit 49ecc8a

Browse files
authored
Merge pull request #83 from gucio321/setup-linter
Setup linter
2 parents a177ac4 + a09c6ba commit 49ecc8a

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "gomod"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
golangci:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up LibGL, Mesa & X11 libraries
15+
run: |
16+
sudo apt-get --allow-releaseinfo-change update
17+
sudo apt-get install -y libgtk-3-dev libasound2-dev libxxf86vm-dev
18+
- name: Set up Go environment
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: '1.19.x'
22+
- uses: actions/checkout@v3
23+
- name: golangci-lint
24+
uses: golangci/[email protected]
25+
with:
26+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
27+
version: v1.50.1
28+
29+
# Optional: working directory, useful for monorepos
30+
# working-directory: somedir
31+
32+
# Optional: golangci-lint command line arguments.
33+
# args: --issues-exit-code=0
34+
35+
# Optional: show only new issues if it's a pull request. The default value is `false`.
36+
# only-new-issues: true
37+
38+
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
39+
# skip-pkg-cache: true
40+
41+
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
42+
# skip-build-cache: true

.golangci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
linters:
3+
disable-all: true
4+
enable:
5+
- gofmt
6+
7+
run:
8+
timeout: 5m
9+
10+
issues:
11+
max-same-issues: 0
12+
exclude-use-default: false

0 commit comments

Comments
 (0)