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

Introduce nixf-tidy #777

Closed
kachick opened this issue Sep 8, 2024 · 3 comments · Fixed by #805
Closed

Introduce nixf-tidy #777

kachick opened this issue Sep 8, 2024 · 3 comments · Fixed by #805
Labels
enhancement New feature or request

Comments

@kachick kachick added the enhancement New feature or request label Sep 8, 2024
@kachick kachick added this to 🛸 Sep 12, 2024
@github-project-automation github-project-automation bot moved this to 🙋‍♂ in 🛸 Sep 12, 2024
@kachick
Copy link
Owner Author

kachick commented Sep 12, 2024

💭 Without this, zed and the default nixd integration displays many warnings

@kachick
Copy link
Owner Author

kachick commented Sep 12, 2024

Draft

git ls-files '*.nix' | xargs -I{} bash <<'BASH'
echo -n '{}: '
git diff --exit-code --quiet <(printf '[]\n') <(<{} nixf-tidy --pretty-print --variable-lookup)
echo "$?"
BASH


git ls-files '*.nix' | xargs -I{} bash <(<<'BASH'
echo -n "$1: "
BASH
) {}


git ls-files '*.nix' | xargs -I{} bash -c '
echo -n "{}: "
git diff --exit-code --quiet <(printf "[]\n") <(<{} nixf-tidy --pretty-print --variable-lookup)
echo "$?"
'

kachick added a commit that referenced this issue Sep 16, 2024
Preparation for GH-527
Part of GH-777

Fixes GH-680 and closes GH-742
@github-project-automation github-project-automation bot moved this from 💪 to 🎉 in 🛸 Sep 27, 2024
@kachick
Copy link
Owner Author

kachick commented Nov 19, 2024

When refactoring in #943, it throws much parse-redundant-paren

https://github.com/nix-community/nixd/blob/0f3c0c730e5cb9414f3b269dc9b36062a0e5236e/libnixf/src/Basic/diagnostic.py#L49-L51

I'm not positive for these, because of I wish nixfmt-rfc-style should cover these if need.

And nixf-tidy does not take CLI options to modify behavior. And the returned JSON does not include severity. Might be dropped 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant