Automatically enforce Phobos's styleguide

Seb via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 27 20:41:09 PDT 2016


On Wednesday, 27 April 2016 at 12:38:55 UTC, Andrei Alexandrescu 
wrote:
> On 04/26/2016 09:36 PM, Seb wrote:
>> Great news:
>> 1) I submitted a couple of trivial fixes (#4245, #4246, #4247)
>> 2) The Travis bot passes :)
>>
>> As mentioned I decreased the linting to a minimum, but now we 
>> do have it :)
>> Future work can fix more violations in the Phobos codebase - 
>> small low
>> hanging fruits include e.g. > 120 lines or undocumented public 
>> methods.
>>
>> For more details:
>> https://github.com/dlang/phobos/pull/4243
>
> Nice initiative. Thanks for doing this. Please stay on 4243 and 
> merge it as soon as possible, so we don't have ripples 
> following the style change from pulling other diffs. Thx! -- 
> Andrei

Just a quick update that #4243 is in and the linting bot is now 
running.
As I mentioned earlier there are still many trivial flags of 
Dscanner's static analysis that could be enabled. I marked them 
with "FIXME", so @anyone feel free to have a look.
Moreover (once dub is 1.0 and released together with dmd), we 
want to enable the same linting in the Makefile.

@Mark Isaacson: Great idea, but that sounds more like a plugin 
for an IDE. dfmt usually fixes most of the style issues, however 
Dscanner does also analysis of the code.


More information about the Digitalmars-d mailing list