dlang-community / D-Scanner

Swiss-army knife for D source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use dscanner to replace phobos style_lint_shellcmds

thewilsonator opened this issue · comments

Phobos does a bunch of style checks with grep, it would be good to do those with dscanner instead (partly so we can ignore the etc. directory.

https://github.com/dlang/phobos/blob/master/posix.mak#L589

Things phobos checks with grep

  • Check for trailing whitespace
  • Enforce whitespace before opening parenthesis
  • Enforce no whitespace after opening parenthesis
  • Enforce whitespace between colon(:) for import statements (doesn't catch everything)
  • Check for package wide std.algorithm imports
  • Enforce Allman style
  • Enforce do { to be in Allman style
  • Enforce no space between assert and the opening brace, i.e. assert(
  • Enforce space after cast(...)
  • Enforce space between a .. b
  • Enforce space between binary operators

I'm sure that Dscanner does most of these but if any are missing, that would be good to add.