Skip to content
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

Add golangci-lint for static check. #69

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Add golangci-lint for static check. #69

merged 1 commit into from
Apr 15, 2024

Conversation

zzheng2020
Copy link
Contributor

@zzheng2020 zzheng2020 commented Apr 14, 2024

Close #48

Add golangci-lint for static check.

Copy link
Member

@slhmy slhmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for contributing with this PR~

I should appologize to you that I didn't describe clear enough on #69.
It will be nice if you can adjust this PR with the following requirements:

  1. Remove .golangci.yml (I will be more prefer to have the default settings, since I don't want to have too many customized options). You can give me reasons if you think keeping it will be better.
  2. Combine Golangci Lint & Build and Test action together into one job, this should save some resource (or make build will run twice since test and cilint are in different jobs)

@zzheng2020
Copy link
Contributor Author

Hi, thanks for the review. :)
I have another question. Do you prefer to use golangci-lint to check existing code, or is it only applied to new pull requests?

@slhmy
Copy link
Member

slhmy commented Apr 14, 2024

Hi, thanks for the review. :) I have another question. Do you prefer to use golangci-lint to check existing code, or is it only applied to new pull requests?

If could, apply it to existing code, but we may push this target gently (or later). I not so sure if current code can totally pass the check.

I also decide to replace go vet to golangcilint in the make check target (we will need to provide a Ubuntu binary install approach first), but it's another task since this PR seems to aims on Github actions (and the toolkit works better than local binaries).

@zzheng2020
Copy link
Contributor Author

Hi, the current code cannot pass the check.

set skip-pkg-cache and skip-build-cache to true due to these two issues. issue 1, issue 2.

@zzheng2020 zzheng2020 requested a review from slhmy April 14, 2024 17:04
Copy link
Member

@slhmy slhmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@slhmy slhmy merged commit a0a90f5 into oj-lab:main Apr 15, 2024
2 checks passed
@slhmy
Copy link
Member

slhmy commented Apr 15, 2024

You will receive invitations to join OJ Lab in your email, also there is a QQ group invitation for the one we can find in our directories o.O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use golangci-lint for static check
2 participants