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

chore: formatted code and fixed lints #317

Closed
wants to merge 1 commit into from
Closed

chore: formatted code and fixed lints #317

wants to merge 1 commit into from

Conversation

AxelSilverdew
Copy link
Contributor

I took the liberty of formatting all the code with alejandra and resolving a few lint warnings that were thrown by statix.

This should make it a wee bit easier to contribute code to the repo.

@Patryk27
Copy link
Contributor

While I'm not necessarily the number one fan of this particular formatting style (more of a nixpkgs-fmt guy myself), I think as long as we have something consistent, it's nice -- would it be possible to attach some formatting check into the pipeline as well, so that misformatted code can't be committed?

cc @nmattia, ofc.

@AxelSilverdew
Copy link
Contributor Author

Oh yeah, it should be pretty easy to add a format and lint check to the pipeline.
I'll push a commit adding that in a little bit.

@nmattia
Copy link
Collaborator

nmattia commented Oct 30, 2023

Oh, I had never heard of Alejandra! I don't have a strong opinion for one style or another, but since this is technically a nix-community project, might be less confusing to use nixpkgs-fmt? or is alejandra the accepted default formatter now?

would it be possible to attach some formatting check into the pipeline

would even go further and say: let's not format anything unless there are CI checks :)

@AxelSilverdew
Copy link
Contributor Author

AxelSilverdew commented Oct 30, 2023

since this is technically a nix-community project, might be less confusing to use nixpkgs-fmt?

That's a good point, I have no problem using nixpkgs-fmt here instead of alejandra if needed.

I just picked alejandra because that's been my goto default for a while now, so it was just force of habit :D

This discussion is what made me choose alejandra for my own projects in case you were interested in giving it a read.

would even go further and say: let's not format anything unless there are CI checks :)

Checks for formatting and linting? Or checks for functionality in general?

For formatting and linting we'd just need actions to run nix run nixpkgs#alejandra -- --check . and nix run nixpkgs#statix check.

For general checks, I'm gonna try to get our existing tests to pass over the weekend.

@AxelSilverdew
Copy link
Contributor Author

Also for the record, I don't have a preference between nixpkgs-fmt or alejandra, so I'm fine with whatever as long as the outputs are consistent. :D

@AxelSilverdew AxelSilverdew closed this by deleting the head repository May 11, 2024
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.

3 participants