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

Formatting of Nix Code on the wiki #57

Open
jopejoe1 opened this issue Apr 4, 2024 · 2 comments
Open

Formatting of Nix Code on the wiki #57

jopejoe1 opened this issue Apr 4, 2024 · 2 comments

Comments

@jopejoe1
Copy link
Member

jopejoe1 commented Apr 4, 2024

Should we format the nix code on the wiki with the nixfmt-rfc-style formatter?
This would make it so that the code on the wiki is following the same style that currently in the process of being adopted by nixpkgs.

Automating this could bring some issues with it, some of these being the unintended formatting of code that is intended to be formatted differently than the standard defined in RFC166, another one is that it could turn into a fight against the tools when editing.

We would need to find out how we investigate how the tools will behave when run against the wiki!

@jopejoe1 jopejoe1 changed the title RFC166 Formatting of Nix Code on the wiki Formatting of Nix Code on the wiki Apr 4, 2024
@Mic92
Copy link
Member

Mic92 commented Apr 5, 2024

Even something that does syntax checks might be already valuable.

@tomodachi94
Copy link
Member

This sounds like something that would be ideal for a bot to handle.

Automating this could bring some issues with it, some of these being the unintended formatting of code that is intended to be formatted differently than the standard defined in RFC166, another one is that it could turn into a fight against the tools when editing.

Adding a marker (for example, in a hidden HTML comment, something like <!-- [[User:nixfmt bot]] ignore start --> and <!-- [[User:nixfmt bot]] ignore stop -->) would definitely be the best way to prevent this.

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

3 participants