Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup linting #314

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@ name: Analysis

on:
push:
branches: [master]
branches: [ master ]
pull_request:
branches: [master]
branches: [ master ]
schedule:
- cron: '13 7 * * 6'

jobs:
linting:
runs-on: ubuntu-latest

steps:
-
name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

-
name: golangci-lint
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018
with:
version: v1.42.1


vulnerabilities:
runs-on: ubuntu-latest

Expand All @@ -17,15 +34,17 @@ jobs:

steps:
-
name: Checkout repository
name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

-
name: Initialize
name: initialize
uses: github/codeql-action/init@v1
with:
languages: go

-
name: Perform CodeQL Analysis
name: codeql analyze
uses: github/codeql-action/analyze@v1
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
linters:
disable-all: true
enable:
- lll
- misspell

linters-settings:
lll:
line-length: 200
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Update usage help text and documentation. (#308, @miry)
* Run e2e tests to validate the command line and basic features of server, client and application (#309, @miry)
* Add /v2 suffix to module import path (#311, @dnwe)
* Setup code linter (#314, @miry)

# [2.1.5]

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ all: setup build
test:
go test -v -race ./...

.PHONY: lint
lint:
golangci-lint run

.PHONY: e2e
e2e: build
bin/e2e
Expand Down
1 change: 1 addition & 0 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ up:
- homebrew:
- gnu-tar
- goreleaser
- golangci-lint
- go:
version: 1.17
modules: true