Skip to content

Commit

Permalink
PMM-5723 Reviewdog checks. (#187)
Browse files Browse the repository at this point in the history
* PMM-5723 Reviewdog checks.

* PMM-5723 Reviewdog required checks.
  • Loading branch information
BupycHuk committed May 26, 2020
1 parent 3a8f385 commit 417acc0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .golangci-required.yml
@@ -0,0 +1,25 @@
---
# The most valuable linters; they are required to pass for PR to be merged.

linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
# use "github.com/pkg/errors" instead
- errors

goimports:
local-prefixes: github.com/percona/mongodb_exporter

linters:
disable-all: true
enable:
- depguard
- goimports
- ineffassign
- govet
- staticcheck

issues:
exclude-use-default: false
10 changes: 10 additions & 0 deletions .travis.yml
Expand Up @@ -38,6 +38,16 @@ env:
- MONGODB_IMAGE=percona/percona-server-mongodb:3.6
- MONGODB_IMAGE=percona/percona-server-mongodb:4.0

install:
# install reviewdog and golangci-lin
- curl https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s
- curl https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s latest

before_script:
# static analyze
- bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check
- bin/golangci-lint run -c=.golangci.yml --out-format=line-number | bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review

script: make test-all

jobs:
Expand Down

0 comments on commit 417acc0

Please sign in to comment.