test: run lint-check during CI, add forbidigo, cleanup linter exclusions #1181

Merged
mfenniak merged 4 commits from mfenniak/forgejo-runner:test-linter-cleanup into main 2025-11-23 15:01:53 +00:00
Owner

v12.0.0 had a println statement from debugging left in the release. Whoops. forbidigo wasn't in enabled in golangci and golangci wasn't running in CI. Made a couple other cleanups at the same time.

  • other
    • PR: test: run lint-check during CI, add forbidigo, cleanup linter exclusions
v12.0.0 had a `println` statement from debugging left in the release. Whoops. `forbidigo` wasn't in enabled in golangci and golangci wasn't running in CI. Made a couple other cleanups at the same time. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/1181): <!--number 1181 --><!--line 0 --><!--description dGVzdDogcnVuIGBsaW50LWNoZWNrYCBkdXJpbmcgQ0ksIGFkZCBmb3JiaWRpZ28sIGNsZWFudXAgbGludGVyIGV4Y2x1c2lvbnM=-->test: run `lint-check` during CI, add forbidigo, cleanup linter exclusions<!--description--> <!--end release-notes-assistant-->
mfenniak force-pushed test-linter-cleanup from 58c3ba094b
Some checks failed
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / build and test (pull_request) Failing after 39s
checks / validate mocks (pull_request) Successful in 36s
checks / validate pre-commit-hooks file (pull_request) Successful in 36s
checks / runner exec tests (pull_request) Has been skipped
checks / runner integration tests (pull_request) Has been skipped
checks / integration tests (pull_request) Successful in 12m48s
to 61d4c0a717
All checks were successful
checks / build and test (pull_request) Successful in 49s
checks / validate mocks (pull_request) Successful in 32s
checks / validate pre-commit-hooks file (pull_request) Successful in 36s
checks / runner exec tests (pull_request) Successful in 33s
Integration tests for the release process / release-simulation (pull_request) Successful in 5m7s
checks / runner integration tests (pull_request) Successful in 5m38s
checks / integration tests (pull_request) Successful in 12m11s
issue-labels / release-notes (pull_request_target) Successful in 5s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 7s
cascade / forgejo (pull_request_target) Successful in 1m45s
2025-11-22 16:27:44 +00:00
Compare
@ -72,85 +73,10 @@ linters:
rules:
- linters:
- dupl
- errcheck
Owner

should those be added again in a future pr? I'm not familiar with golint rules

should those be added again in a future pr? I'm not familiar with golint rules
Contributor

those rules were copy/pasted from forgejo, it is a good cleanup 👍

those rules were copy/pasted from forgejo, it is a good cleanup 👍
Author
Owner

This is an exclusion rule -- the more things removed here, the more are actually enabled. So, nope, not to be added again. 🙂

This is an exclusion rule -- the more things removed here, the more are actually enabled. So, nope, not to be added again. 🙂
viceice marked this conversation as resolved
Contributor

@mfenniak wrote in #1181 (comment):

golangci wasn't running in CI.

It was, indirectly:

- run: make FORGEJO_URL=http://$FORGEJO_HOST_PORT test

Line 108 in 012b11f
test: lint-check fmt-check

@mfenniak wrote in https://code.forgejo.org/forgejo/runner/pulls/1181#issue-10054: > golangci wasn't running in CI. It was, indirectly: https://code.forgejo.org/forgejo/runner/src/commit/012b11f223c6cc222f4c088472802de481a0cb23/.forgejo/workflows/test.yml#L73 https://code.forgejo.org/forgejo/runner/src/commit/012b11f223c6cc222f4c088472802de481a0cb23/Makefile#L108
Contributor

I prefer lint-check to be called explicitly and early. 👍

I prefer lint-check to be called explicitly and early. 👍
mfenniak deleted branch test-linter-cleanup 2025-11-23 15:01:53 +00:00
Sign in to join this conversation.
No milestone
No assignees
4 participants
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
forgejo/runner!1181
No description provided.