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

style: nph formatting #1067

Merged
merged 2 commits into from
Jan 21, 2025
Merged

style: nph formatting #1067

merged 2 commits into from
Jan 21, 2025

Conversation

AuHau
Copy link
Member

@AuHau AuHau commented Jan 14, 2025

This PR implements code formatting using nph of folders codex/ and tests/.

It is enforced on CI level using https://github.com/arnetheduck/nph-action. Nice thing it can suggest formatting changes in case somebody forgets to format its PR before submitting it.

More details on how to use it can be found in README: https://github.com/codex-storage/nim-codex/pull/1067/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R60

This work is based on nwaku implementation of nph - so kudos to them!

@AuHau AuHau requested review from dryajov, gmega and emizzle January 14, 2025 14:06
@AuHau AuHau force-pushed the style/nph-implementation branch from db6bd63 to ab566e7 Compare January 14, 2025 14:13
Copy link
Contributor

@benbierens benbierens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to have a precommit hook and a workflow checking step. Even if the style itself isn't perfect, I think this is still a very good thing to have.

@gmega
Copy link
Member

gmega commented Jan 14, 2025

Yes we know you just want to have your name amongst the contributors with the most lines added/deleted, @AuHau ...

Copy link
Member

@gmega gmega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a more serious note: I'm happy to have nph, but I think we need to make sure versions match locally and in CI.

@AuHau
Copy link
Member Author

AuHau commented Jan 15, 2025

@emizzle and @gmega - CI action pinned. Please re-review ;-)

@AuHau AuHau requested a review from gmega January 15, 2025 07:44
Copy link
Contributor

@emizzle emizzle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arnetheduck
Copy link

committer

see https://github.com/arnetheduck/nph/blob/master/format-git-repo.sh#L12 for how to not become the target of future git blame - after all, the last to change the code is the one that is responsible for it's maintenance until the next sucker comes around ;)

@AuHau
Copy link
Member Author

AuHau commented Jan 15, 2025

committer

see arnetheduck/nph@master/format-git-repo.sh#L12 for how to not become the target of future git blame - after all, the last to change the code is the one that is responsible for it's maintenance until the next sucker comes around ;)

That is a super cool tip! Thanks will employ it ;-)

@AuHau AuHau force-pushed the style/nph-implementation branch from e0eceb4 to 1bf6dd1 Compare January 15, 2025 09:40
@arnetheduck
Copy link

something to be mindful of: when you merge this with the usual non-fast-forward squash merge, the commit hashes will change invalidating git-blame-ignore-revs - better merge manually or create ignore-revs separately

@AuHau AuHau added the Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details label Jan 16, 2025
@AuHau AuHau self-assigned this Jan 16, 2025
@AuHau AuHau force-pushed the style/nph-implementation branch 2 times, most recently from fa46361 to 893b5e0 Compare January 21, 2025 09:39
@AuHau AuHau force-pushed the style/nph-implementation branch from b4b0735 to eb8824b Compare January 21, 2025 17:00
@AuHau AuHau added this pull request to the merge queue Jan 21, 2025
Merged via the queue into master with commit e5df8c5 Jan 21, 2025
18 checks passed
@AuHau AuHau deleted the style/nph-implementation branch January 21, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants