-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
chore(lint): use golangci-lint to call revive and misspell checker. #18145
Conversation
Signed-off-by: Bo-Yi Wu <[email protected]>
@@ -280,29 +278,6 @@ errcheck: | |||
@echo "Running errcheck..." | |||
@errcheck $(GO_PACKAGES) | |||
|
|||
.PHONY: revive | |||
revive: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see why we would remove revive, I'm not sure if it actually could be a drop-in as I know from golangci-lint that they don't always have 100% configuration as if you have with cmd command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should integrate revive in golangci-lint?
$(GO) install github.com/client9/misspell/cmd/[email protected]; \ | ||
fi | ||
@echo "Running misspell-check..." | ||
@$(GO) run build/code-batch-process.go misspell -error -i unknwon '{file-list}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this shouldn't be touched, as it's using build/code-batch-process.go
which seems to be special build made to batch this misspell action. Not sure why, maybe one of the other maintainers can shed some light on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build/code-batch-process.go
is only a wrapper for CLI.
In Windows, you can not pass more than 32K bytes via CLI arguments, so thecode-batch-process.go
split the file names into batches. We can just ignore the wrapper during refacotoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, this PR just removes The comment said |
|
Signed-off-by: Bo-Yi Wu <[email protected]>
Signed-off-by: Bo-Yi Wu <[email protected]>
@wxiaoguang we can enable the |
Which one is the misspell check? |
Codecov Report
@@ Coverage Diff @@
## main #18145 +/- ##
=======================================
Coverage ? 45.01%
=======================================
Files ? 825
Lines ? 91557
Branches ? 0
=======================================
Hits ? 41215
Misses ? 43756
Partials ? 6586
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faster linting 🎉
make lgtm work |
* giteaoffical/main: (22 commits) Add MP4 as default allowed attachment type (go-gitea#18170) [skip ci] Updated translations via Crowdin Include folders into size cost (go-gitea#18158) Don't delete branch if other PRs with this branch are open (go-gitea#18164) Remove unused route "/tasks/trigger" (go-gitea#18160) Fix EasyMDE validation (go-gitea#18161) Fix bug (go-gitea#18168) tests: add coverage for models migration helpers (go-gitea#18162) [skip ci] Updated translations via Crowdin Require codereview to have content (go-gitea#18156) chore(lint): use golangci-lint to call revive and misspell checker. (go-gitea#18145) Update owners for 2022 (go-gitea#18155) Refactor auth package (go-gitea#17962) Unify and simplify TrN for i18n (go-gitea#18141) Use correct user when determining max repo limits for error messages (go-gitea#18153) Add singuliere to MAINTAINERS (go-gitea#18148) [skip ci] Updated licenses and gitignores Add API to get issue/pull comments and events (timeline) (go-gitea#17403) Upgrade certmagic from v0.14.1 to v0.15.2 (go-gitea#18138) Upgrade certmagic from v0.14.1 to v0.15.2 (go-gitea#18138) ...
The document should also be updated, eg: https://docs.gitea.io/en-us/hacking-on-gitea/#formatting-code-analysis-and-spell-check : |
…o-gitea#18145) replace revive and misspell with golangci-lint Signed-off-by: Bo-Yi Wu <[email protected]>
--> Remove code-batch-process #21471 |
replace revive and misspell with golangci-lint
Signed-off-by: Bo-Yi Wu [email protected]