blob: 881727adb39884171ac4e6c93319ea4b83280281 [file] [edit]
# https://github.com/maruel/pre-commit-go configuration file to run checks
# automatically on commit, on push and on continuous integration service after
# a push or on merge of a pull request.
#
# See https://godoc.org/github.com/maruel/pre-commit-go/checks for more
# information.
min_version: 0.4.7
modes:
continuous-integration:
checks:
coverage:
- use_global_inference: false
use_coveralls: true
global:
min_coverage: 50
max_coverage: 90
per_dir_default:
min_coverage: 80
max_coverage: 90
per_dir:
checks:
min_coverage: 70
max_coverage: 90
cmd/pcg: null
scm:
min_coverage: 60
max_coverage: 100
custom:
- display_name: sample-pre-commit-go-custom-check
description: runs the check sample-pre-commit-go-custom-check on this repository
command:
- sample-pre-commit-go-custom-check
- check
check_exit_code: true
prerequisites:
- help_command:
- sample-pre-commit-go-custom-check
- -help
expected_exit_code: 2
url: github.com/maruel/pre-commit-go/samples/sample-pre-commit-go-custom-check
errcheck:
- ignores: Close
gofmt:
- {}
goimports:
- {}
golint:
- blacklist: []
govet:
- blacklist:
- ' composite literal uses unkeyed fields'
test:
- extra_args:
- -v
- -race
max_duration: 120
lint:
checks:
errcheck:
- ignores: Close
golint:
- blacklist: []
govet:
- blacklist:
- ' composite literal uses unkeyed fields'
max_duration: 15
pre-commit:
checks:
copyright:
- header: |-
// Copyright 2016 Marc-Antoine Ruel. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
gofmt:
- {}
test:
- extra_args:
- -short
max_duration: 5
pre-push:
checks:
coverage:
- use_global_inference: false
use_coveralls: true
global:
min_coverage: 50
max_coverage: 90
per_dir_default:
min_coverage: 70
max_coverage: 90
per_dir:
cmd/pcg: null
scm:
min_coverage: 60
max_coverage: 100
goimports:
- {}
test:
- extra_args:
- -v
- -race
max_duration: 15
ignore_patterns:
- vendor
- .*
- _*
- '*.pb.go'