[PR #223] [MERGED] Setup lint and format of Go, Proto and yaml/markdown #1327

Closed
opened 2025-12-29 02:29:42 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/223
Author: @kradalby
Created: 11/13/2021
Status: Merged
Merged: 11/15/2021
Merged by: @kradalby

Base: mainHead: golanglint


📝 Commits (10+)

📊 Changes

66 files changed (+2974 additions, -1862 deletions)

View changed files

📝 .github/workflows/build.yml (+1 -2)
📝 .github/workflows/lint.yml (+27 -10)
📝 .golangci.yaml (+47 -1)
📝 Makefile (+14 -1)
📝 README.md (+19 -4)
📝 acls.go (+86 -63)
📝 acls_test.go (+41 -35)
📝 acls_types.go (+22 -20)
📝 api.go (+174 -125)
📝 app.go (+169 -112)
📝 app_test.go (+8 -6)
📝 apple_mobileconfig.go (+70 -30)
📝 cli_test.go (+11 -8)
📝 cmd/headscale/cli/debug.go (+27 -5)
📝 cmd/headscale/cli/namespaces.go (+67 -15)
📝 cmd/headscale/cli/nodes.go (+137 -32)
📝 cmd/headscale/cli/preauthkeys.go (+56 -23)
📝 cmd/headscale/cli/root.go (+2 -1)
📝 cmd/headscale/cli/routes.go (+65 -20)
📝 cmd/headscale/cli/utils.go (+40 -17)

...and 46 more files

📄 Description

This PR sets up linting for all our different file types in the CI and adds a format command to make to try to improve consistency.

I have disabled a bunch of linters, some intentionally.

However there is a list of "best practice" linters that I think we should add, but we have a solid backlog to get them passing.

This PR is initial work for #219


🔄 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/juanfont/headscale/pull/223 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 11/13/2021 **Status:** ✅ Merged **Merged:** 11/15/2021 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `golanglint` --- ### 📝 Commits (10+) - [`6b3114a`](https://github.com/juanfont/headscale/commit/6b3114ad6fb893660f2575b37b73f1f053b40ee5) Run prettier - [`edfcdc4`](https://github.com/juanfont/headscale/commit/edfcdc466c554a4a578b52f11a1dc5ef7a2d38f0) Update lint ci file with prettier and proto - [`03b7ec6`](https://github.com/juanfont/headscale/commit/03b7ec62cae3935705dc3b8811a122e6ad6b6a68) Go format with shorter lines - [`dae34ca`](https://github.com/juanfont/headscale/commit/dae34ca8c559d008f8e7078841a3a8ed2536a5aa) Proto format - [`2634215`](https://github.com/juanfont/headscale/commit/2634215f125289f65cc101e37f859db1e66e6baa) golangci-lint --fix - [`3ddd996`](https://github.com/juanfont/headscale/commit/3ddd9962ce3ac6c0a9a867943a3f0ae05bcd3e95) Add format make entry - [`148437f`](https://github.com/juanfont/headscale/commit/148437f716cb8aec155eb2f255122f3732bbb445) Setup more linters and goals for golangci - [`24e0c94`](https://github.com/juanfont/headscale/commit/24e0c944b1ed896c21d672dee548518d909011ef) Align with update golangci-lint - [`95b9f03`](https://github.com/juanfont/headscale/commit/95b9f03fb384be564f7bf3930411a5be7d2cee76) update buf setup - [`fa0922d`](https://github.com/juanfont/headscale/commit/fa0922d5bb640969d1bec4e4b6df1a4eb1ccf6e1) define proto dir for buf ### 📊 Changes **66 files changed** (+2974 additions, -1862 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+1 -2) 📝 `.github/workflows/lint.yml` (+27 -10) 📝 `.golangci.yaml` (+47 -1) 📝 `Makefile` (+14 -1) 📝 `README.md` (+19 -4) 📝 `acls.go` (+86 -63) 📝 `acls_test.go` (+41 -35) 📝 `acls_types.go` (+22 -20) 📝 `api.go` (+174 -125) 📝 `app.go` (+169 -112) 📝 `app_test.go` (+8 -6) 📝 `apple_mobileconfig.go` (+70 -30) 📝 `cli_test.go` (+11 -8) 📝 `cmd/headscale/cli/debug.go` (+27 -5) 📝 `cmd/headscale/cli/namespaces.go` (+67 -15) 📝 `cmd/headscale/cli/nodes.go` (+137 -32) 📝 `cmd/headscale/cli/preauthkeys.go` (+56 -23) 📝 `cmd/headscale/cli/root.go` (+2 -1) 📝 `cmd/headscale/cli/routes.go` (+65 -20) 📝 `cmd/headscale/cli/utils.go` (+40 -17) _...and 46 more files_ </details> ### 📄 Description This PR sets up linting for all our different file types in the CI and adds a format command to make to try to improve consistency. I have disabled a bunch of linters, some intentionally. However there is a list of "best practice" linters that I think we should add, but we have a solid backlog to get them passing. This PR is initial work for #219 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:29:42 +01:00
adam closed this issue 2025-12-29 02:29:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1327