mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9cb9c6eba4
release notes: - v1.20.0: https://github.com/golangci/golangci-lint/releases/tag/v1.20.0 - Add WSL linter (#771) - Add gocognit linter (#756) - govet: add more analyzers - dramatically reduce memory usage - reduce 1.5x memory usage on large repos on repeated runs - Rename deadline option to timeout and mark deadline as deprecated - v1.19.1: https://github.com/golangci/golangci-lint/releases/tag/v1.19.1 - v1.19.0: https://github.com/golangci/golangci-lint/releases/tag/v1.19.0 - Add dogsled linter. - Add whitespace linter - Add Godox linter support - Various performance optimizations - v1.18.0: https://github.com/golangci/golangci-lint/releases/tag/v1.18.0 - Support go1.13 - Update format of junit xml output to mark failures as such - Speed up linting: use deduplicated packages - Add user supplied error messages in depguard issues - Add funlen linter Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
27 lines
868 B
Bash
Executable file
27 lines
868 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e -o pipefail
|
|
|
|
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# CI platforms differ, so per-platform GOLANGCI_LINT_OPTS can be set
|
|
# from a platform-specific Dockerfile, otherwise let's just set
|
|
# (somewhat pessimistic) default of 10 minutes.
|
|
: "${GOLANGCI_LINT_OPTS=--timeout=10m}"
|
|
|
|
[ -n "${TESTDEBUG}" ] && set -x
|
|
|
|
# TODO find a way to share this code with hack/make.sh
|
|
if ${PKG_CONFIG} 'libsystemd >= 209' 2> /dev/null ; then
|
|
DOCKER_BUILDTAGS+=" journald"
|
|
elif ${PKG_CONFIG} 'libsystemd-journal' 2> /dev/null ; then
|
|
DOCKER_BUILDTAGS+=" journald journald_compat"
|
|
fi
|
|
|
|
# TODO use --out-format=junit-xml and store artifacts
|
|
# shellcheck disable=SC2086
|
|
GOGC=75 golangci-lint run \
|
|
${GOLANGCI_LINT_OPTS} \
|
|
--print-resources-usage \
|
|
--build-tags="${DOCKER_BUILDTAGS}" \
|
|
--verbose \
|
|
--config "${SCRIPTDIR}/golangci-lint.yml"
|