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

add formatter schema #56

Merged
merged 3 commits into from
Sep 20, 2022
Merged

add formatter schema #56

merged 3 commits into from
Sep 20, 2022

Conversation

zimbatm
Copy link
Contributor

@zimbatm zimbatm commented Sep 19, 2022

This is needed for flakes that want to support nix fmt.

Right now it's missing some testing as I didn't find a test framework for it.

Needed by numtide/treefmt#169

This is needed for flakes that want to support `nix fmt`
modules/formatter.nix Outdated Show resolved Hide resolved
modules/formatter.nix Outdated Show resolved Hide resolved
@roberth
Copy link
Member

roberth commented Sep 20, 2022

Seems to work after suggestions and looks alright.

Right now it's missing some testing as I didn't find a test framework for it.

Yeah the testing situation is kinda bad because I don't want to pollute the repo with test dependencies and such. People complain about those, even in other repos that aren't low level like this one. Not sure if I should wait for something like NixOS/nix#6124

zimbatm and others added 2 commits September 20, 2022 15:53
Co-authored-by: Robert Hensing <[email protected]>
Co-authored-by: Robert Hensing <[email protected]>
@zimbatm
Copy link
Contributor Author

zimbatm commented Sep 20, 2022

Yeah the testing situation is kinda bad because I don't want to pollute the repo with test dependencies and such. People complain about those, even in other repos that aren't low level like this one. Not sure if I should wait for something like NixOS/nix#6124

Yeah, I know what you mean. One workaround would be to add a tests/flake.nix that refers back to the root flake. nix run ./tests#.?

@roberth
Copy link
Member

roberth commented Sep 20, 2022

One workaround would be to add a tests/flake.nix that refers back to the root flake. nix run ./tests#.?

Yeah, I'm doing something similar in the dev directory, though that's a very unusual not-quite-flake because you can't reference up (../), at least not when I wrote that solution.

@zimbatm zimbatm marked this pull request as ready for review September 20, 2022 14:29
@zimbatm
Copy link
Contributor Author

zimbatm commented Sep 20, 2022

Oh well :) I think this is ready. I switched the upstream PR to this branch, and it's working as intended.

@roberth

This comment was marked as outdated.

bors bot added a commit that referenced this pull request Sep 20, 2022
56: add formatter schema r=roberth a=zimbatm

This is needed for flakes that want to support `nix fmt`.

Right now it's missing some testing as I didn't find a test framework for it.

Needed by numtide/treefmt#169


Co-authored-by: zimbatm <[email protected]>
Co-authored-by: Jonas Chevalier <[email protected]>
@bors

This comment was marked as outdated.

@roberth
Copy link
Member

roberth commented Sep 20, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 20, 2022

Build succeeded:

@bors bors bot merged commit f17e9db into hercules-ci:main Sep 20, 2022
@zimbatm zimbatm deleted the formatter branch September 21, 2022 11:08
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.

2 participants