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

"lint --fix" output doesn't always satisfy "format features" #32

Open
zdave-parity opened this issue Aug 31, 2023 · 4 comments
Open

"lint --fix" output doesn't always satisfy "format features" #32

zdave-parity opened this issue Aug 31, 2023 · 4 comments

Comments

@zdave-parity
Copy link

It seems that when adding to a multi-line feature list "lint --fix" doesn't add a comma after the last item, but "format features" demands one.

@ggwpez
Copy link
Owner

ggwpez commented Sep 1, 2023

Yes the --fix is not doing it in canonical form. Currently the way is to always run zepter f f at the end.

The problem is that otherwise it would have the change the formatting of the existing features; although it was only instructed to fix them. I think the --fix should produce a minimal git diff for easier review.
The zepter f f then produces a larger (but more trivial) diff for review.

@zdave-parity
Copy link
Author

Minimal diff makes sense, but if the features are already formatted according to zepter f f then it seems like lint --fix shouldn't break this?

@ggwpez
Copy link
Owner

ggwpez commented Sep 1, 2023

Minimal diff makes sense, but if the features are already formatted according to zepter f f then it seems like lint --fix shouldn't break this?

Hm yes, good idea. I can add a check to see if it was formatted first and then keep that.

@ggwpez
Copy link
Owner

ggwpez commented Sep 1, 2023

Actually just adding a , does not work in the case that the line would become longer than the 80 chars since then it has to do a line-break instead. It would also require to pass in all formatting information to the lint CLI command, which is ugly…
I think i will rather start working on config files so that it becomes possible to just run zepter in the monorepo and it does all of these steps automatically.

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

No branches or pull requests

2 participants