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
Prev Previous commit
Next Next commit
feat: handle output in current directory if no 2nd argument is found
  • Loading branch information
vmfunc authored and Xephi committed Aug 27, 2024
commit 0a2cc3947dac720b28917bf8087fe0a0e0b8e304
11 changes: 9 additions & 2 deletions coding-style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ function cat_readme() {

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 '[^"]*$')
Expand Down