mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
9185e04b69
Also add a Makefile target and CI task for it.
18 lines
417 B
Bash
Executable File
18 lines
417 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
# Check Go source files for disallowed content.
|
|
|
|
echo 'Disallowed import of net/rpc:'
|
|
if find . -name '*.go' | xargs grep '"net/rpc"'; then
|
|
exit 1
|
|
else
|
|
echo ' None!'
|
|
fi
|
|
|
|
echo 'Disallowed call of unix.{Umask,Getrlimit,Setrlimit}'
|
|
if find . -name '*.go' | egrep -v '\./pkg/(mods/unix|daemon|testutil)' | xargs egrep 'unix\.(Umask|Getrlimit|Setrlimit)'; then
|
|
exit 1
|
|
else
|
|
echo ' None!'
|
|
fi
|