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
on fix action support comment for group #749
Comments
@m47730 Hi 👋 Thank for your feedback! It's a bug, we'll fix it. |
@mgrachev I don't think it's a bug (in pure form at least) Comment belongs to ENV variable and not to group. AFAIR it was expected behavior. ###> group1 ### - here could be a comment specific for this env
ENV4=ddd So. we keep it after reordering for the initial ENV variable. Otherwise how to understand if comment belongs to group or env variable? But we could consider to keep comments in case of empty line above or below the comment, probably with ability to control the behavior 🤔 Btw, this may work as workaround: ###> group1 ### - there is empty line before and after, we shouldn't change it
ENV4=ddd
ENV5=eee
ENV3=ccc
###< group1 ### |
Thank you for the workaround (it works as expected) Could I suggest an option for unbind the comment to next line? |
I think it makes sense to have an argument for this behavior |
Saw on your repo description that you're open to newcomers. I'm about as green to group development as can be. Though I do have plenty of experience in Rust and development overall (And plenty of time to spare). I wouldn't mind trying to add this QOL improvement. All I need is a bit of upfront guidance and I could probably throw it together. In the meantime I'll keep poking through the repo until I feel confident enough to try something on my own. |
The comment appears to be moved in UnorderedKeyFixer's sort_part function. Altering the the
Though I believe that's the end of the line for me. Pulling through a command line argument to that point seems to require some degree of restructuring/better understanding of the code base. I'm willing to try but I'd rather not circumvent any current design decisions. |
Hi,
first of all thanks for this tool, i love it!
I struggle with this: if i try to automatically fix an unsorted env files with groups with comment as delimiter
for example:
ends up with a sorted list but some key go outside the "comment group" (see
ENV3
):instead i'd like this output:
The text was updated successfully, but these errors were encountered: