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 Golang lint to GitHub Actions for static Go code formatting scanning #718

Open
FeynmanZhou opened this issue Jun 21, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@FeynmanZhou
Copy link
Member

Is your feature request related to a problem?

N/A

What solution do you propose?

Golang lint is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config. It’s used to make sure code adheres to common Go practices. It supports enable many different types of linters.

I think we can introduce it to Notation to enable static code formatting scanning in each pull request.

What alternatives have you considered?

N/A

Any additional context?

No response

@FeynmanZhou FeynmanZhou added enhancement New feature or request triage Need to triage labels Jun 21, 2023
@FeynmanZhou FeynmanZhou added good first issue Good for newcomers and removed triage Need to triage labels Jun 21, 2023
@tungbq
Copy link

tungbq commented Jun 21, 2023

Hi, I'm interested in the CI task like this. Do you need help? Can I pick up this task?

@FeynmanZhou
Copy link
Member Author

Hi @tungbq , thanks for your interest! Yes, we can assign this issue to you.

@tungbq
Copy link

tungbq commented Jun 24, 2023

Updates:

  • Research the https://github.com/golangci/golangci-lint-action official GitHub action for golangci-lint
  • Add golangci-lint-action to the CI workflows as it's the official GitHub action for golangci-lint from its authors. The action runs golangci-lint and reports issues from linters.
  • Name the new workflow as golangci-lint-action in .github/workflows/go-lint.yml
  • Current behaviour:
    • Run golangci-lint on every PR
    • Report only new issue generated from the PR (by using only-new-issues: true option from golangci-lint-action)
    • Beside of PR events, there has an option in the trigger event to allow us manually run the workflow if needed (workflow_dispatch:)

Created new PR #723 for this task.

Copy link

This issue is stale because it has been opened for 60 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 22, 2024
@yizha1 yizha1 added this to the Future milestone Mar 22, 2024
@yizha1 yizha1 removed the Stale label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

3 participants