[PR #549] [CLOSED] Use pre-commit #1331

Closed
opened 2026-05-07 01:01:36 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/549
Author: @nicois
Created: 12/17/2022
Status: Closed

Base: mainHead: nicois/pre-commit


📝 Commits (2)

  • 108ad3c Add pre-commit hooks
  • b218e62 Actually apply the pre-commit fixers to the codebase.

📊 Changes

152 files changed (+42295 additions, -31039 deletions)

View changed files

📝 .github/workflows/build.yaml (+9 -16)
📝 .github/workflows/docs.yaml (+6 -11)
.github/workflows/pre-commit.yml (+13 -0)
📝 .github/workflows/release.yaml (+11 -19)
📝 .github/workflows/test.yaml (+12 -22)
📝 .gitpod.yml (+1 -1)
📝 .goreleaser.yml (+18 -29)
.pre-commit-config.yaml (+26 -0)
📝 CODE_OF_CONDUCT.md (+1 -2)
📝 LICENSE.GPLv2 (+0 -1)
📝 README.md (+7 -7)
📝 auth/auth_sqlite.go (+6 -5)
📝 auth/auth_sqlite_test.go (+3 -2)
📝 client/client.go (+3 -2)
📝 client/client_test.go (+3 -2)
📝 client/config.go (+2 -1)
📝 client/config_test.go (+3 -2)
📝 client/options.go (+2 -1)
📝 cmd/access.go (+3 -2)
📝 cmd/access_test.go (+2 -1)

...and 80 more files

📄 Description

Add pre-commit hooks

This will ensure that there is standard linting applied to files in
the repository. It assists in avoiding conflicts due to different
contributers' IDEs.

It is recommended that contributers run the following:
`pre-commit install -t pre-push -t pre-commit`

Without this, either I need to disable my IDE's auto-linting/fixing, or keep undoing the fixes it makes before pushing commits. Other contributers will be in a similar situation. Otherwise, their PRs will include syntax changes which distract from reviewing the real behavioural changes.

There are standard formatters for most file formats. Along with stripping trailing whitespace, this cleans up the files without modifying their behaviour in any way.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/549 **Author:** [@nicois](https://github.com/nicois) **Created:** 12/17/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `nicois/pre-commit` --- ### 📝 Commits (2) - [`108ad3c`](https://github.com/binwiederhier/ntfy/commit/108ad3c7c39424e1e674520038f400f55ef83bb5) Add pre-commit hooks - [`b218e62`](https://github.com/binwiederhier/ntfy/commit/b218e62ffcfedf5936bc275dfda61613b3702d1a) Actually apply the pre-commit fixers to the codebase. ### 📊 Changes **152 files changed** (+42295 additions, -31039 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yaml` (+9 -16) 📝 `.github/workflows/docs.yaml` (+6 -11) ➕ `.github/workflows/pre-commit.yml` (+13 -0) 📝 `.github/workflows/release.yaml` (+11 -19) 📝 `.github/workflows/test.yaml` (+12 -22) 📝 `.gitpod.yml` (+1 -1) 📝 `.goreleaser.yml` (+18 -29) ➕ `.pre-commit-config.yaml` (+26 -0) 📝 `CODE_OF_CONDUCT.md` (+1 -2) 📝 `LICENSE.GPLv2` (+0 -1) 📝 `README.md` (+7 -7) 📝 `auth/auth_sqlite.go` (+6 -5) 📝 `auth/auth_sqlite_test.go` (+3 -2) 📝 `client/client.go` (+3 -2) 📝 `client/client_test.go` (+3 -2) 📝 `client/config.go` (+2 -1) 📝 `client/config_test.go` (+3 -2) 📝 `client/options.go` (+2 -1) 📝 `cmd/access.go` (+3 -2) 📝 `cmd/access_test.go` (+2 -1) _...and 80 more files_ </details> ### 📄 Description Add pre-commit hooks This will ensure that there is standard linting applied to files in the repository. It assists in avoiding conflicts due to different contributers' IDEs. It is recommended that contributers run the following: `pre-commit install -t pre-push -t pre-commit` Without this, either I need to disable my IDE's auto-linting/fixing, or keep undoing the fixes it makes before pushing commits. Other contributers will be in a similar situation. Otherwise, their PRs will include syntax changes which distract from reviewing the real behavioural changes. There are standard formatters for most file formats. Along with stripping trailing whitespace, this cleans up the files without modifying their behaviour in any way. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:36 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1331
No description provided.