Skip to content

Add new spacing rules pending from DML style guide #108

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jvsqzj
Copy link
Contributor

@jvsqzj jvsqzj commented May 29, 2025

Address pending rules tracked in issue #71

  • SP.reserved: spaces around reserved words, such as if, else, default, size, const and in, except when a reserved word is used as an identifier (e.g., local uint8 *data;) - @alecalvop
  • SP.binop: spaces around binary operators except the dereferencing operators dot (a.b) and arrow (a->b) - @jvsqzj
  • SP.ternary: spaces around ? and : in the ternary ?: operator - @jvsqzj
  • SP.ptrdecl: space between a type and the * marking a pointer - @dtarassenko
  • NSP.ptrdecl: no space after the * marking a pointer in a declaration - @dtarassenko
  • SP.comment: spaces around the comment delimiters //, /* and **/ - @kevv87

Use robust check for spacing tests
dtarassenko and others added 2 commits June 26, 2025 15:57
* Add pointer declaration spacing rules

* Remove NspPtrDecl disable
@jvsqzj jvsqzj force-pushed the feature/71-spacing-pending-rules branch from 2af6f35 to 76b5474 Compare July 3, 2025 22:14
@jvsqzj
Copy link
Contributor Author

jvsqzj commented Jul 3, 2025

There seems to be a problem with the #[serde(default)] attribute we use for LintCfg and its fields.
If one forgets to add it, then the test_example_lintcfg will pass even if the example_lintcfg.json file does not have the added rule.

We should make this clear to avoid this type of silent issues.

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

Successfully merging this pull request may close these issues.

3 participants