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

refactor: one rule, one file #170

Merged
merged 1 commit into from
Jun 21, 2023
Merged

refactor: one rule, one file #170

merged 1 commit into from
Jun 21, 2023

Conversation

anderseknert
Copy link
Member

Having all rules lumped into a single file only per category got to be a bit messy eventually. This change uses one file per rule, making it easier to both find and to work with rules in isolation — hopefully making it easier to contribute new ones too.

There is still a few things I would like to fix, like having unit tests actually be unit tests, and not as it currently stands that they test an input against all rules in the category... but this change is big enough as it is, so I'm deferring that to a future PR.

Fixes #144

Having all rules lumped into a single file only per
category got to be a bit messy eventually. This change
uses one file per rule, making it easier to both find and
to work with rules in isolation — hopefully making it easier
to contribute new ones too.

There is still a few things I would like to fix, like having
unit tests actually be unit tests, and not as it currently stands
that they test an input against *all* rules in the category...
but this change is big enough as it is, so I'm deferring that to
a future PR.

Fixes #144

Signed-off-by: Anders Eknert <anders@styra.com>
Copy link
Member

@srenatus srenatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split and moved, ✔️

@anderseknert anderseknert merged commit b57ac0e into main Jun 21, 2023
1 check passed
@anderseknert anderseknert deleted the one-rule-one-file branch June 21, 2023 09:19
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.

Restructure rules directory — one rule, one file
3 participants