Skip to content

proper filtering of dscanner#4285

Merged
Hackerpilot merged 2 commits intodlang:masterfrom
wilzbach:update_travis_dscanner
May 7, 2016
Merged

proper filtering of dscanner#4285
Hackerpilot merged 2 commits intodlang:masterfrom
wilzbach:update_travis_dscanner

Conversation

@wilzbach
Copy link
Contributor

@wilzbach wilzbach commented May 6, 2016

It turns out that currently dscanner is failing, but we just silently filter these error messages.

  1. Thus for (yet to be known reasons) dscanner throws exceptions for a couple of modules in std (and everything in etc). I will try to dig deeper into the assertion error, but for now this should actually test most of phobos with dscanner ;-)

  2. the replacement sed 's/dparse_verbose/StdLoggerDisableWarning/' is to use the fast debug build without any debug logging ;-)

Ping @CyberShadow @Hackerpilot

@CyberShadow
Copy link
Member

Auto-merge toggled on

.travis.yml Outdated
- (cd .. && rdmd ./checkwhitespace.d $(find phobos -name '*.d'))
- 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
- ./dsc --config .dscanner.ini --styleCheck $(find std -type f -name '*.d' | grep -vE 'std/c/process.d|std/outbuffer.d|std/stream.d|std/traits.d|std/typecons.d|std/conv.d')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filter should not be necessary now that v0.4.0-alpha3 is tagged. See dlang-community/dsymbol@ede71c4 for the fix of the root cause.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it appears that there's a bug causing D-Scanner to not exit with a value of 1 when problems are found, so this won't fail correctly.

@Hackerpilot
Copy link
Contributor

Auto-merge toggled off

@wilzbach wilzbach force-pushed the update_travis_dscanner branch from 9723d63 to d833613 Compare May 7, 2016 11:27
@wilzbach wilzbach force-pushed the update_travis_dscanner branch from d833613 to c39d2ca Compare May 7, 2016 11:29
- (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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imports to core won't resolve (cloning this won't solve the problem, as it has imports to gcc/builtins and ldc/intrinsics)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use dub fetch dscanner --version=0.4.0-alpha4 and dub run dscanner instead of cloning all repos. That would even allow to cache the .dub folder (though that is hardly faster).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartinNowak currently building with dub doesn't work, but I do agree that this would be nicer!

@wilzbach wilzbach force-pushed the update_travis_dscanner branch from c39d2ca to 69a3d9e Compare May 7, 2016 12:38
@wilzbach
Copy link
Contributor Author

wilzbach commented May 7, 2016

@Hackerpilot thanks a lot for updating dscanner - bumped to alpha4 ;-)

@Hackerpilot
Copy link
Contributor

Auto-merge toggled on

@Hackerpilot Hackerpilot merged commit 0117797 into dlang:master May 7, 2016
@wilzbach wilzbach deleted the update_travis_dscanner branch May 9, 2016 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants