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

Rule: one-liner-rule #431

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Rule: one-liner-rule #431

merged 1 commit into from
Oct 30, 2023

Conversation

anderseknert
Copy link
Member

Custom rule to suggest one-liner syntax where possible. Taking into account:

  • Line length of shortened rule must not exceed max line length (configurable, default 120)
  • Comments in rule body cancels suggestion, as we can't turn those to one-liners without changing "semantics" of the comment

Fixes #420

Custom rule to suggest one-liner syntax where possible. Taking into account:

* Line length of shortened rule must not exceed max line length (configurable,
  default 120)
* Comments in rule body cancels suggestion, as we can't turn those to one-liners
  without changing "semantics" of the comment

Fixes #420

Signed-off-by: Anders Eknert <[email protected]>
@anderseknert anderseknert merged commit 8f14ced into main Oct 30, 2023
3 checks passed
@anderseknert anderseknert deleted the one-liner-if branch October 30, 2023 10:20
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Custom rule to suggest one-liner syntax where possible. Taking into account:

* Line length of shortened rule must not exceed max line length (configurable,
  default 120)
* Comments in rule body cancels suggestion, as we can't turn those to one-liners
  without changing "semantics" of the comment

Fixes StyraInc#420

Signed-off-by: Anders Eknert <[email protected]>
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.

Recommend one-liner if syntax
2 participants