-
Notifications
You must be signed in to change notification settings - Fork 136
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
Bump golangci to get the latest lints & fix lints #984
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally great!
@@ -10,6 +10,14 @@ linters-settings: | |||
golint: | |||
min-confidence: 0 | |||
|
|||
issues: | |||
include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to always include all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it still makes sense for some low risk issues to be excluded. Is it possible to get the security team to audit low risk issues instead of add gosec
tag?
@@ -2150,11 +2150,7 @@ func GetClusterHardwareInfoTable(startTime, endTime string, db *gorm.DB) (TableD | |||
if !ok { | |||
m[s] = &hardWare{s, map[string]int{row[1]: 1}, make(map[string]int), 0, make(map[string]float64), ""} | |||
} | |||
if _, ok := m[s].Type[row[1]]; ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart linter...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すげー😲
@@ -260,7 +261,7 @@ func (t *Task) searchLog(client diagnosticspb.DiagnosticsClient, targetType diag | |||
} | |||
for _, msg := range res.Messages { | |||
line := logMessageToString(msg) | |||
_, err := bufWriter.Write(*(*[]byte)(unsafe.Pointer(&line))) | |||
_, err := bufWriter.Write(*(*[]byte)(unsafe.Pointer(&line))) // #nosec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, this error is checked and why do we need nosec
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every unsafe
api invoke should use nosec
tag... I'm wondering whether we need to turn on all gosec rules. Obviously, we know what we are doing when we use a specific api.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: b1dc59c
|
* feat(ui): add timezone information (#974) * Fix endpoint scheme detection for TLS origination to PD (#977) * build(deps): bump path-parse from 1.0.6 to 1.0.7 in /ui (#978) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump path-parse from 1.0.6 to 1.0.7 in /ui/tests (#981) * Bump golangci to get the latest lints & fix lints (#984) * Ci cherry pick version (#989) * chore: add distro translation (#995) * chore: add distro translation * fix: lowercase * update: release version Co-authored-by: LINKIWI <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
According to
exclude-use-default
at golangci-lint, I re-include EXC0006, EXC0007, EXC0008, EXC0009, EXC0010.