Prepare for long line checks in travis#4299
Conversation
|
There's no reason to not get rid of lines longer than 120 characters, even if they are inside of unittest blocks. And I'm of the opinion that automated style checking is a very good idea. |
This is just a natural part of dogfooding. Eventually, we want dscanner and dfmt to become official tools, but if even the D contributors aren't using/testing it, then why should anyone else. |
Yes, and I expected it to break, and in many places. That's the whole point of this: to fix these style deviations and make it so they cannot happen again. |
Yep I totally agree with @JackStouffer. Thanks a lot for pushing this ;-)
Well you say "that Dscaning now is premature and not well implemented.", but how is it going to be mature if no one uses or tests it?
That's exactly why Andrei liked the idea btw! |
Basically it's an automated enforcement of the D Style:
|
Please back up assertions with evidence. As we have already mentioned, dscanner has bugs, but that's why we're dogfooding it. That's not a reason to throw out the idea wholesale. |
I think it's a waste of resources to have this discussion. |
|
👍 Don't mind @bbasile, I think he's just a bit too liquored up at the moment :) Making the error messages nicer would be a point of improvement going forward. BTW, @JackStouffer, it seems your git email address is not associated with your GitHub account. |
916f1ee to
eaeae70
Compare
|
@wilzbach @CyberShadow That's everything. |
|
Hmm, why is the doc build failing? Is it this? |
|
The internal Unicode tables look like they might be machine-generated, thus they may break again if regenerated. @DmitryOlshansky ? |
|
@CyberShadow hmm, deprecation messages are now supposed to work with enum messages, so if I change it to this: I get |
|
@CyberShadow for the unicode tables, I just ran them though dfmt. So if they need to be regenerated later, then dfmt can just be rerun. |
Might be a use case for the implicit string concatenation thing (unless that's enabled in Travis already?) |
|
Putting the I'm pretty sure that concatenating strings in deprecated messages is allowed as of dmd 2.071. |
I thought so too, but it seems to not work. |
|
It's right there in the changelog: http://dlang.org/changelog/2.071.0.html#extended-deprecated |
I don't know what to tell you man. It doesn't work. |
|
Omit the |
|
Can't, the line is too long. |
|
I mean this stupid trick (same as in C++): It should be deprecated and removed, but IIRC it should still work for the moment. |
|
@CyberShadow fixed. |
Welp, I guess travis answered that question. |
|
D'oh.
|
|
Auto-merge toggled on |
|
@JackStouffer what stopped you from enabling the long line check?
Be creative. It's just one occurrence in socketstream that will be removed anyhows, e.g. just removing "from Phobos" in the message already gets you below 120 ;-) |
The unwillingness of the compiler maintainers to admit that 16014 is a bug. |
Yeah I know, but as said it's easy to workaround and there's only one occurrence - the following just uses 115 chars ;-) deprecated("It will be removed in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD")
module std.socketstream; |
|
Btw in the bug another workaround was suggested: pragma(msg, __FILE__,"(",__LINE__,"): this module is deprecated");Imho just pick one workaround and enable the check before more violations are merged in, |
This should be one of the easier ones to enable and then fix, so let's see how this breaks.