#!/bin/sh # script/lint: run the linter. golangci-lint is never installed on the host; # it runs only in docker, as the `lint` phase of the Dockerfile. --no-cache # forces the phase to re-execute, so a cached layer cannot report a pass it # did not earn. The build is tagged so no dangling image is left behind. set -eu ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" main() { cd "$ROOT" docker build --no-cache --target lint \ -t "$(script/projectname)-lint" . } main "$@"