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

Chore(workflow): add GitHub workflows for code analysis #199

Open
wants to merge 1 commit into
base: tombstone
Choose a base branch
from

Conversation

tsonglew
Copy link
Member

@tsonglew tsonglew commented Mar 8, 2023

  1. add golangci-lint workflow
  2. add CodeQL workflow to discover vulnerabilities

1. add golangci-lint workflow
2. add CodeQL workflow to discover vulnerabilities

Signed-off-by: Tsonglew <[email protected]>
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5
Copy link

Choose a reason for hiding this comment

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

Code Review:

The code patch looks good and well written. There are no bugs found in the code. As for improvement suggestions, it would be good to include a comment before each line of code to explain what it does, this will make it easier for other developers to understand and use the code. Additionally, you could consider adding some unit tests to ensure that the code is working as intended.

# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
Copy link

Choose a reason for hiding this comment

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

code review:

  1. It looks like you are using the latest version of the golangci-lint action. It is always good practice to use the latest version, as it may contain bug fixes or improvements.
  2. You have set the working directory which is useful for monorepos.
  3. It looks like you are setting the timeout for the action to 3 minutes. This is a good idea to ensure that the action does not take too long to complete.
  4. You have enabled the verbose option, which is useful for debugging any errors that may occur.
  5. You have also enabled the only-new-issues option, which will help you to show only new issues in pull requests.
  6. You have enabled caching options like skip-cache, skip-pkg-cache, and skip-build-cache which will help to improve the performance of the action.
  7. It is good that you have provided permission access to contents and pull-requests.

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.

1 participant