Chore(workflow): add GitHub workflows for code analysis#199
Open
tsonglew wants to merge 1 commit into
Open
Conversation
tsonglew
commented
Mar 8, 2023
Member
- add golangci-lint workflow
- add CodeQL workflow to discover vulnerabilities
1. add golangci-lint workflow 2. add CodeQL workflow to discover vulnerabilities Signed-off-by: Tsonglew <tsonglew@gmail.com>
| # make release | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
code review:
- 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.
- You have set the working directory which is useful for monorepos.
- 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.
- You have enabled the verbose option, which is useful for debugging any errors that may occur.
- You have also enabled the only-new-issues option, which will help you to show only new issues in pull requests.
- 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.
- It is good that you have provided permission access to contents and pull-requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.