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

[Feature] Enable code formatting, go imports, linters in CI #76

Closed
1 of 2 tasks
Jeffwan opened this issue Oct 17, 2021 · 7 comments
Closed
1 of 2 tasks

[Feature] Enable code formatting, go imports, linters in CI #76

Jeffwan opened this issue Oct 17, 2021 · 7 comments
Labels
ci enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Jeffwan
Copy link
Collaborator

Jeffwan commented Oct 17, 2021

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

We may not always remember to do this work which results in inconsistent formatting issue.
Let's create the standard to help us maintain the code here.

  • gofmt
  • goimports
  • golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.7

golangci-lint run  ./... # introduce linter config.yaml if necessary

I think the overall idea is to improve project quality. See suggestions here https://goreportcard.com/report/github.com/ray-project/kuberay

image

image

Use case

To avoid inconsistency issue from different contributors.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@Jeffwan Jeffwan added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 17, 2021
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Oct 19, 2021

I will keep this open. @feilengcui008 helps add linter and we still need to check fmt and goimports. If there's a difference, we should block the PR.

@Jeffwan Jeffwan added this to the v0.2.0 release milestone Oct 19, 2021
@Jeffwan Jeffwan added the ci label Jan 17, 2022
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Jan 17, 2022

/cc @wilsonwang371

@wilsonwang371
Copy link
Collaborator

Is this bug done?

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Feb 23, 2022

@wilsonwang371 which bug?

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Feb 23, 2022

golint has been marked as deprecated in golangci-lint. Above screenshot is not that helpful anymore. Default linter is good enough. golangci/golangci-lint#1892

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Feb 23, 2022

There're lots of failures after we enable linter against apiserver and cli.

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Mar 5, 2022

Those issues have been fixed in #158

@Jeffwan Jeffwan closed this as completed Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants