build: use lefthook for pre-commit #5248

Merged
tobiasd merged 18 commits from misc/pre-commit into master 2025-08-27 15:22:12 +00:00
Member

update docs
update nix-shell to auto install
rework custom pre-commit hooks to integrate better
add dockerfile for lefthook and integrate into drone
add some more hooks for formatting and linting some files

update docs update nix-shell to auto install rework custom pre-commit hooks to integrate better add dockerfile for lefthook and integrate into drone add some more hooks for formatting and linting some files
delliott force-pushed misc/pre-commit from 5658b6edb4 to cbae249287 2025-08-22 12:27:26 +00:00 Compare
delliott force-pushed misc/pre-commit from 081e99b02f to 41ced411b9 2025-08-22 13:09:35 +00:00 Compare
delliott force-pushed misc/pre-commit from 777143422a to c0b59bed2f 2025-08-22 14:08:30 +00:00 Compare
delliott force-pushed misc/pre-commit from c0b59bed2f to d6e45ce0bc 2025-08-22 14:12:25 +00:00 Compare
delliott force-pushed misc/pre-commit from d6e45ce0bc to 53369cf69c 2025-08-22 14:13:06 +00:00 Compare
delliott force-pushed misc/pre-commit from 53369cf69c to c060f560cd 2025-08-22 14:31:50 +00:00 Compare
delliott force-pushed misc/pre-commit from c060f560cd to bf5553f8aa 2025-08-22 14:37:49 +00:00 Compare
delliott force-pushed misc/pre-commit from bf5553f8aa to 407c51e552 2025-08-22 14:41:42 +00:00 Compare
delliott requested review from tobiasd 2025-08-22 14:42:52 +00:00
Author
Member

So, this seems to work locally.

It fails in ci as this pr reformats .html files, and hence triggers the critical failure for adding .html files to repo.

This should not be a problem in future, and I think should just be ignored, and this pr merged over the failure.

It does add some extra install deps to the build process, but I think it is okay.

So, this seems to work locally. It fails in ci as this pr reformats .html files, and hence triggers the critical failure for adding .html files to repo. This should not be a problem in future, and I think should just be ignored, and this pr merged over the failure. It does add some extra install deps to the build process, but I think it is okay.
delliott changed title from build: use lefthook for pre-commit to WIP: build: use lefthook for pre-commit 2025-08-22 14:53:28 +00:00
Owner

I went over the changes once - looking good.

I went over the changes once - looking good.
delliott force-pushed misc/pre-commit from c98e6dc7bd to 7a594844fc 2025-08-22 19:50:34 +00:00 Compare
delliott force-pushed misc/pre-commit from 7a594844fc to f4d78d8cc8 2025-08-22 19:51:29 +00:00 Compare
delliott force-pushed misc/pre-commit from f4d78d8cc8 to b0612524f3 2025-08-22 19:57:18 +00:00 Compare
delliott force-pushed misc/pre-commit from b0612524f3 to 85265b69aa 2025-08-23 10:23:34 +00:00 Compare
delliott force-pushed misc/pre-commit from 85265b69aa to 8ae48eb3ed 2025-08-23 10:26:22 +00:00 Compare
delliott force-pushed misc/pre-commit from 8ae48eb3ed to 6514418806 2025-08-23 10:28:30 +00:00 Compare
delliott force-pushed misc/pre-commit from 6514418806 to 3658122e99 2025-08-23 10:29:36 +00:00 Compare
delliott force-pushed misc/pre-commit from 3658122e99 to dda233f3c1 2025-08-23 10:38:33 +00:00 Compare
delliott force-pushed misc/pre-commit from dda233f3c1 to f14a2a6044 2025-08-24 10:41:18 +00:00 Compare
delliott force-pushed misc/pre-commit from f14a2a6044 to 31ba7a1b49 2025-08-24 10:44:59 +00:00 Compare
delliott force-pushed misc/pre-commit from a855543ffa to 19f738abc6 2025-08-24 10:58:01 +00:00 Compare
delliott force-pushed misc/pre-commit from 19f738abc6 to 32ea77f0ee 2025-08-24 10:58:59 +00:00 Compare
delliott force-pushed misc/pre-commit from 9e5faaebd8 to 70f516e150 2025-08-24 11:11:26 +00:00 Compare
delliott force-pushed misc/pre-commit from 70f516e150 to ac86923c87 2025-08-24 11:12:09 +00:00 Compare
delliott force-pushed misc/pre-commit from ac86923c87 to a413ea684d 2025-08-24 11:12:47 +00:00 Compare
delliott force-pushed misc/pre-commit from a413ea684d to f45789a678 2025-08-24 11:30:58 +00:00 Compare
delliott force-pushed misc/pre-commit from f45789a678 to 1ffa4c6f07 2025-08-24 11:35:24 +00:00 Compare
delliott force-pushed misc/pre-commit from 1ffa4c6f07 to da94f41456 2025-08-24 11:35:51 +00:00 Compare
delliott force-pushed misc/pre-commit from 81ccc39242 to c03a02b371 2025-08-26 14:26:25 +00:00 Compare
delliott changed title from WIP: build: use lefthook for pre-commit to build: use lefthook for pre-commit 2025-08-26 14:37:55 +00:00
delliott force-pushed misc/pre-commit from c03a02b371 to 1868bffbe3 2025-08-26 15:31:11 +00:00 Compare
delliott force-pushed misc/pre-commit from 1868bffbe3 to ab6cc8a3f0 2025-08-27 13:56:04 +00:00 Compare
delliott force-pushed misc/pre-commit from ab6cc8a3f0 to 439aed1fd7 2025-08-27 13:58:11 +00:00 Compare
tobiasd reviewed 2025-08-27 14:44:38 +00:00
@@ -20,4 +26,2 @@
</xsl:element>
</xsl:element>
<xsl:element name="td">
<xsl:value-of select="@amount"/>&#160;
Owner

my guess is, there was a good reason for adding the &#160M here.

my guess is, there was a good reason for adding the `&#160M` here.
Author
Member

My guess is that it is easier to type the escape code than copy and paste a non breaking space.

Also I think historically some of the build scripts and tooling could not handle this kind of thing well, but with the rewrite that is no longer an issue.

I will deploy it to test to see the changes.

My guess is that it is easier to type the escape code than copy and paste a non breaking space. Also I think historically some of the build scripts and tooling could not handle this kind of thing well, but with the rewrite that is no longer an issue. I will deploy it to test to see the changes.
Author
Member

My guess is that it is easier to type the escape code than copy and paste a non breaking space.

Also I think historically some of the build scripts and tooling could not handle this kind of thing well, but with the rewrite that is no longer an issue.

My guess is that it is easier to type the escape code than copy and paste a non breaking space. Also I think historically some of the build scripts and tooling could not handle this kind of thing well, but with the rewrite that is no longer an issue.
Author
Member

After a deploy on test there are no visible changes:

https://test.fsfe.org/donate/thankgnus-2025.en.html

https://fsfe.org/donate/thankgnus-2025.en.html

I think it is fine.

After a deploy on test there are no visible changes: https://test.fsfe.org/donate/thankgnus-2025.en.html https://fsfe.org/donate/thankgnus-2025.en.html I think it is fine.
delliott marked this conversation as resolved
delliott force-pushed misc/pre-commit from 439aed1fd7 to c2636d841e 2025-08-27 14:56:07 +00:00 Compare
delliott force-pushed misc/pre-commit from c2636d841e to 330c5bc519 2025-08-27 15:01:04 +00:00 Compare
delliott added 1 commit 2025-08-27 15:12:56 +00:00
misc: do not format .cutom jas files, as they are from thirdparties
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
61410713df
tobiasd merged commit 1a05dee2f6 into master 2025-08-27 15:22:12 +00:00
Sign in to join this conversation.
No description provided.