Skip to content

Commit

Permalink
CI: Unwanted patterns check
Browse files Browse the repository at this point in the history
  • Loading branch information
MomIsBestFriend committed Dec 24, 2019
1 parent 5a7b5c9 commit a980ecc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -R --include=*.{py,pyx} 'xrange' pandas
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check for use of ("%r" % foo) instead of {repr(foo)}' ; echo $MSG
invgrep -R --include=*.{py,pyx} -E '\s%r' pandas | invgrep -v '%%r'
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check for use of {foo!r} instead of {repr(foo)}' ; echo $MSG
invgrep -R --include=*.{py,pyx} '!r}' pandas
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check that no file in the repo contains trailing whitespaces' ; echo $MSG
INVGREP_APPEND=" <- trailing whitespaces found"
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" *
Expand Down

0 comments on commit a980ecc

Please sign in to comment.