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 22, 2019
1 parent 835f207 commit 0b207a8
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 @@ -203,6 +203,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -R --include=*.{py,pyx} '\.__class__' 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 0b207a8

Please sign in to comment.