mirror of
https://github.com/containers/podman
synced 2024-10-22 02:03:38 +00:00
9ee50fe2c7
Unify handling for the --volume, --mount, --volumes-from, --tmpfs and --init flags into a single file and set of functions. This will greatly improve readability and maintainability. Further, properly handle superceding and conflicting mounts. Our current patchwork has serious issues when mounts conflict, or when a mount from --volumes-from or an image volume should be overwritten by a user volume or named volume. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
47 lines
1.5 KiB
Bash
Executable file
47 lines
1.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
# Create the linter path for use later
|
|
LINTER=${GOPATH}/bin/gometalinter
|
|
|
|
# Make sure gometalinter is installed
|
|
if [ ! -f ${LINTER} ]; then
|
|
echo >&2 "gometalinter must be installed. Please run 'make install.tools' and try again"
|
|
exit 1
|
|
fi
|
|
|
|
PKGS=$(find . -type d -not -path . -a -not -iwholename '*.git*' -a -not -iname '.tool' -a -not -iwholename '*vendor*' -a -not -iname 'hack' -a -not -iwholename '*.artifacts*' -a -not -iwholename '*contrib*' -a -not -iwholename '*test*' -a -not -iwholename '*logo*' -a -not -iwholename '*conmon*' -a -not -iwholename '*completions*' -a -not -iwholename '*docs*' -a -not -iwholename '*pause*' -a -not -iwholename './_output*' -a -not -iwholename '*ioprojectatomicpodman.go')
|
|
|
|
echo $PKGS
|
|
|
|
# Execute the linter
|
|
${LINTER} \
|
|
--concurrency=4\
|
|
--enable-gc\
|
|
--vendored-linters\
|
|
--deadline=600s --disable-all\
|
|
--enable=deadcode\
|
|
--enable=errcheck\
|
|
--enable=gofmt\
|
|
--enable=golint\
|
|
--enable=ineffassign\
|
|
--enable=megacheck\
|
|
--enable=misspell\
|
|
--enable=structcheck\
|
|
--enable=varcheck\
|
|
--enable=vet\
|
|
--enable=vetshadow\
|
|
--exclude='error return value not checked.*\(errcheck\)$'\
|
|
--exclude='declaration of.*err.*shadows declaration.*\(vetshadow\)$'\
|
|
--exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$'\
|
|
--exclude='duplicate of.*_test.go.*\(dupl\)$'\
|
|
--exclude='cmd\/client\/.*\.go.*\(dupl\)$'\
|
|
--exclude='libpod\/.*_easyjson.go:.*'\
|
|
--exclude='vendor\/.*'\
|
|
--exclude='podman\/.*'\
|
|
--exclude='server\/seccomp\/.*\.go.*$'\
|
|
${PKGS[@]}
|