Skip to content

Commit

Permalink
proper filtering of dscanner
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed May 7, 2016
1 parent d0ef84f commit 286e709
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ d: dmd-2.071.0
install:
- wget "https://raw.githubusercontent.com/dlang/dmd/master/src/checkwhitespace.d" -O ../checkwhitespace.d
- git clone https://github.com/Hackerpilot/Dscanner
- (cd Dscanner && git checkout tags/v0.4.0-alpha2)
- (cd Dscanner && git checkout tags/v0.4.0-alpha4)
- (cd Dscanner && git submodule update --init --recursive)
- (cd Dscanner && make githash debug)
# debug build is faster, but disable 'missing import' messages (missing core from druntime)
- (cd Dscanner && sed 's/dparse_verbose/StdLoggerDisableWarning/' -i makefile && make githash debug)
# avoid checking it's dscanner's directory
- mv Dscanner/dsc .
- rm -rf Dscanner
script:
- (cd .. && rdmd ./checkwhitespace.d $(find phobos -name '*.d'))
# enforce whitespace between statements
- grep -E "(for|foreach|foreach_reverse|if|while)\(" $(find . -name '*.d'); test $? -eq 1
- dscanResult=$(./dscanner --config .dscanner.ini --styleCheck std etc 2> /dev/null | grep -vE "(Empty declaration|Primary expression expected)") ; if [ -z "${dscanResult}" ] ; then echo "No warnings found" ; else echo $dscanResult && $(exit 1); fi
# at the moment libdparse has problems to parse some modules (->excludes)
- ./dsc --config .dscanner.ini --styleCheck $(find etc std -type f -name '*.d' | grep -vE 'std/traits.d|std/typecons.d|std/conv.d') -I.

0 comments on commit 286e709

Please sign in to comment.