Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dscanner to replace phobos style_lint_shellcmds #927

Open
thewilsonator opened this issue Aug 30, 2023 · 0 comments
Open

use dscanner to replace phobos style_lint_shellcmds #927

thewilsonator opened this issue Aug 30, 2023 · 0 comments

Comments

@thewilsonator
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant