committed by
GitHub
parent
f1e854a1c0
commit
9c913ee847
6
script/lib.sh
Normal file
6
script/lib.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
# Print an error message to the terminal.
|
||||
print_error() {
|
||||
local red='\033[0;31m'
|
||||
local nocolor='\033[0m'
|
||||
printf "${red}error${nocolor}\t$1\n"
|
||||
}
|
||||
@@ -15,3 +15,6 @@ golangci-lint run ./... ./examples/...
|
||||
|
||||
# Check asm declarations.
|
||||
asmdecl ./...
|
||||
|
||||
# Custom linters.
|
||||
./script/linter/pkgdoc
|
||||
|
||||
12
script/linter/pkgdoc
Executable file
12
script/linter/pkgdoc
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
source script/lib.sh
|
||||
|
||||
status=0
|
||||
pkgs=$(go list -f '{{if not .Doc}}{{.ImportPath}}{{end}}' ./...)
|
||||
for pkg in ${pkgs}; do
|
||||
print_error "${pkg} missing docstring"
|
||||
status=1
|
||||
done
|
||||
|
||||
exit ${status}
|
||||
Reference in New Issue
Block a user