Skip to content

Commit c8f5962

Browse files
committed
lint: Add short import exception for *.mapper.go
*.mapper.go files are formatted using goimports which uses short import format, if there is only a single import. Signed-off-by: Lucas Bremgartner <[email protected]>
1 parent 84f8ad9 commit c8f5962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/lint/no-short-form-imports.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "Checking for short form imports..."
44

5-
OUT=$(git grep --untracked -n -P '^\s*import\s+"' '*.go' ':!:test/mini-oidc/storage/*.go' | grep -v ':import "C"$' || true)
5+
OUT=$(git grep --untracked -n -P '^\s*import\s+"' '*.go' ':!:test/mini-oidc/storage/*.go' ':!:*.mapper.go' | grep -v ':import "C"$' || true)
66
if [ -n "${OUT}" ]; then
77
echo "ERROR: found short form imports: ${OUT}"
88
exit 1

0 commit comments

Comments
 (0)