Skip to content

Commit

Permalink
golangci-lint: set correct build-tags to lint journald if supported
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Sep 18, 2019
1 parent 85b89c9 commit d1363f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hack/validate/golangci-lint
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

[ -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
GOGC=20 golangci-lint run \
${GOLANGCI_LINT_OPTS} \
Expand Down

0 comments on commit d1363f5

Please sign in to comment.