Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore files ignored by git to avoid unexpected reports #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
11 changes: 9 additions & 2 deletions coding-style.sh
Original file line number Diff line number Diff line change
@@ -100,10 +100,17 @@ errors=(

if [ $# == 1 ] && [ $1 == "--help" ]; then
cat_readme
elif [ $# = 2 ];
elif [ $# == 1 ] || [ $# = 2 ];
then
if [ $# == 1 ];
then
REPORTS_DIR=$(my_readlink ".")
elif [ $# = 2 ];
then
REPORTS_DIR=$(my_readlink "$2")
fi

DELIVERY_DIR=$(my_readlink "$1")
REPORTS_DIR=$(my_readlink "$2")
DOCKER_SOCKET_PATH=/var/run/docker.sock
HAS_SOCKET_ACCESS=$(test -r $DOCKER_SOCKET_PATH; echo "$?")
GHCR_REGISTRY_TOKEN=$(curl -s "https://ghcr.io/token?service=ghcr.io&scope=repository:epitech/coding-style-checker:pull" | grep -o '"token":"[^"]*' | grep -o '[^"]*$')