use travis CI to lint Phobos#4243
Conversation
f9296a7 to
fa987bf
Compare
|
My parser hates index.d. |
79daa90 to
8308cb3
Compare
|
Great news: with #4245, #4246, #4247, the Travis passes. As mentioned I decreased the linting to a minimum, but now we do have it :) Btw I found a small bug in libdparse, which the error "Primary expression expressed" is ignored. |
.dscanner.ini
Outdated
| ; Configurue which static analysis checks are enabled | ||
| [analysis.config.StaticAnalysisConfig] | ||
| ; Check variable, class, struct, interface, union, and function names against t | ||
| ; he Phobos style guide |
There was a problem hiding this comment.
The file seems to have been hard-wrapped at a certain column count.
There was a problem hiding this comment.
that's from the default config of Dscanner.
I beautified the two cases, were the hard-wrapping didn't work.
Thanks!
63cf3e7 to
1fe455d
Compare
.travis.yml
Outdated
| @@ -0,0 +1,13 @@ | |||
| sudo: false | |||
| language: generic | |||
There was a problem hiding this comment.
Nope it was an artifact when I tried tests without Dscanner. Good spot!
1fe455d to
eef9cab
Compare
|
Nice work, @wilzbach! I'd love to see automated checking such as this leveraged during PR review. BTW, it would also be useful as a Makefile rule for use during development. Maybe even required before building Phobos/Druntime/DMD/etc. But let's first get this merged in. |
|
I reviewed all changes and everything LGTM. |
@ZombineDev They are submitted as separate PRs (#4245, #4246) because I didn't know how controversial they were. They are already toggled on auto merge, so as soon as win-farm-1 finds some time - I can rebase this PR and then we are good to go :) Thanks a lot for your review & feedback! |
eef9cab to
c06775d
Compare
All pending PRs are in, let's go? |
|
"All checks have passed" 🎉 |
|
Auto-merge toggled on |
|
Well, since this has Andrei's blessing... |
This might be a bit more complicated as we would need to build dscanner then. |
|
Yah a makefile rule would be a nice next step. |
|
It was a bad idea. The new pull requests done in a fine style have already begun to fail because they are affected by the old content in the files, that was never checked. You should rather
|
No, that's not correct. Phobos was green before the checking was enabled. What happened was that someone merged a PR that was failing on Travis, which cause master to fail. The fix is already on auto-merge. |
It is a test and we are experimenting with it and Travis doesn't affect autotester at all. |
|
No i didn't get any mail from travis-CI, anyway, another problem is that some tests can include invalid code or quite unidiomatic code on purpose, which Dscanner could interpret as a problem. I have no concret example just now but I think this is something which can be encountered. |
Sure. If that ever happens, then that PR can just disable the |
It is merged now, so just rebase and all lights should be green again. |
|
Can we please move this into the makefile? There is already checkwhitespace target. |
|
If this was relegated to the make file it never would have happened, as no one wants to touch it for fear of breaking it. |
follow-up to #4239. Here's a simple setup with Travis.
Obviously a lot of stuff fails (= Phobos doesn't stick to it's own style), but I argue that we should fix this and then enable this bot to help submitters.
Using DScanner allows us to check for a couple of goodies:
Ping @Hackerpilot.
For mir we already had to disable a couple of flags due to bugs or coding practices (thus they are not listed here) and I assume as Phobos is a lot bigger, we might need to flip one or other flag, but hey in the end we will have a bot that does all the nitpicking for us!