mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #17921 from ivanvc/enable-var-naming-linter-rule
Enable var-naming linter rule
This commit is contained in:
commit
25367fc7e9
@ -87,9 +87,13 @@ linters-settings: # please keep this alphabetized
|
||||
- name: error-strings
|
||||
severity: error
|
||||
disabled: false
|
||||
# TODO: enable the following rules
|
||||
- name: var-naming
|
||||
disabled: true
|
||||
disabled: false
|
||||
arguments:
|
||||
# The following is the configuration for var-naming rule, the first element is the allow list and the second element is the deny list.
|
||||
- [] # AllowList: leave it empty to use the default (empty, too). This means that we're not relaxing the rule in any way, i.e. elementId will raise a violation, it should be elementID, refer to the next line to see the list of denied initialisms.
|
||||
- ["GRPC", "WAL"] # DenyList: Add GRPC and WAL to strict the rule not allowing instances like Wal or Grpc. The default values are located at commonInitialisms, refer to: https://github.com/mgechev/revive/blob/v1.3.7/lint/utils.go#L93-L133.
|
||||
# TODO: enable the following rules
|
||||
- name: exported
|
||||
disabled: true
|
||||
- name: unexported-return
|
||||
|
@ -110,9 +110,9 @@ func processRow(dashboard, tab string, row *apipb.ListRowsResponse_Row, allTests
|
||||
t.FailureLogs = logs
|
||||
t.FailureRate = float32(failed) / float32(total)
|
||||
if t.FailedRuns > 0 {
|
||||
dashboardUrl := fmt.Sprintf("[%s](https://testgrid.k8s.io/%s#%s)", tab, dashboard, tab)
|
||||
dashboardURL := fmt.Sprintf("[%s](https://testgrid.k8s.io/%s#%s)", tab, dashboard, tab)
|
||||
t.IssueBody = fmt.Sprintf("## %s Test: %s \nTest failed %.1f%% (%d/%d) of the time\n\nfailure logs are:\n| commit | started | log |\n| --- | --- | --- |\n%s\n",
|
||||
dashboardUrl, t.FullName, t.FailureRate*100, t.FailedRuns, t.TotalRuns, strings.Join(t.FailureLogs, "\n"))
|
||||
dashboardURL, t.FullName, t.FailureRate*100, t.FailedRuns, t.TotalRuns, strings.Join(t.FailureLogs, "\n"))
|
||||
t.IssueBody += "\nPlease follow the [instructions in the contributing guide](https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#check-for-flaky-tests) to reproduce the issue.\n"
|
||||
fmt.Printf("%s failed %.1f%% (%d/%d) of the time\n", t.FullName, t.FailureRate*100, t.FailedRuns, t.TotalRuns)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user