-
-
Notifications
You must be signed in to change notification settings - Fork 158
Group lines by control comments #281
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
Group lines by control comments #281
Conversation
|
@dotenv-linter/core What do you think about these changes in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evgeniy-r Thank you for your contribution! 👍
I think we should also support the following case and don't show any warnings:
BB=1
# Simple comment
AA=B
X=X3f17908 to
4b0957f
Compare
Co-authored-by: Grachev Mikhail <work@mgrachev.com>
Co-authored-by: Grachev Mikhail <work@mgrachev.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! 🚀
I changed the
UnorderedKeycheck's logic.Now it also splits lines into sortable groups by control comments.
This is done to make the linter logic more predictable.
Before this PR:
File:
There is one warning (line 3).
After fixing we expect something like this:
And we will get the incorrect file after fixing.
If we fix the
Aakey somehow, it will not be the best solution either, because a user obviously doesn't want fix the lower case.After this PR:
File:
There is no warnings.
✔ Checklist: