Skip to content

Commit

Permalink
[feature] added an option to ignore files openwisp#299
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-yadavv committed Oct 3, 2023
1 parent 5985368 commit bb75ea4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openwisp-qa-check
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ show_help() {
printf " --csslinter\t\t\t: Runs stylelint check\n"
printf "Jslinter check options:\n"
printf " --jslinter\t\t\t: Runs jshint check\n"
printf " --ignore\t\t\t: Ignores the file\n"
}

echoerr() { echo "$@" 1>&2; }
Expand All @@ -54,6 +55,9 @@ runcheckendline() {
! -path "./.*" \
! -path "*.min.*" \
! -path "*.svg" -exec grep -Iq . {} \; -and -print); do
if [[ "$i" == $IGNORE_PATTERN ]]; then
continue
fi
if [ "$(tail -c 1 $i)" != "" ]; then
echo "$i needs newline at the end"
flag=1
Expand Down Expand Up @@ -195,6 +199,7 @@ MIGRATIONS_TO_IGNORE="0"
COMMIT_MESSAGE=$(git log $TRAVIS_PULL_REQUEST_SHA --format=%B -n 1)
FAILURE=0
MODULE=""
IGNORE_PATTERN=" "

while [ "$1" != "" ]; do
case "$1" in
Expand Down Expand Up @@ -244,6 +249,10 @@ while [ "$1" != "" ]; do
shift
MODULE="$1"
;;
--ignore)
shift
IGNORE_PATTERN="$1"
;;
--help)
show_help
exit
Expand Down

0 comments on commit bb75ea4

Please sign in to comment.