D-Scanner
D-Scanner copied to clipboard
use dscanner to replace phobos style_lint_shellcmds
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.