Skip to content

Commit

Permalink
Merge pull request #4285 from wilzbach/update_travis_dscanner
Browse files Browse the repository at this point in the history
proper filtering of dscanner
  • Loading branch information
Hackerpilot committed May 7, 2016
2 parents 95e8b69 + 69a3d9e commit 0117797
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 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.
17 changes: 10 additions & 7 deletions std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -4253,15 +4253,18 @@ package template isBlitAssignable(T)
static if (i == 0)
{
}
else if (T.tupleof[i].offsetof == offset)
{
if (assignable)
continue;
}
else
{
if (!assignable)
return false;
if (T.tupleof[i].offsetof == offset)
{
if (assignable)
continue;
}
else
{
if (!assignable)
return false;
}
}
assignable = isBlitAssignable!(typeof(T.tupleof[i]));
offset = T.tupleof[i].offsetof;
Expand Down
2 changes: 1 addition & 1 deletion std/variant.d
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ private auto visitImpl(bool Strict, VariantType, Handler...)(VariantType variant
result.exceptionFuncIdx = dgidx;
}
}
else if (is(Unqual!(Params[0]) == T))
else static if (is(Unqual!(Params[0]) == T))
{
if (added)
assert(false, "duplicate overload specified for type '" ~ T.stringof ~ "'");
Expand Down

0 comments on commit 0117797

Please sign in to comment.