Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 2ced8de

Browse files
authored
chore: fix issues with golangci-lint (#613) (#614)
* chore: go vet is already called by golangci-lint See dnephin/pre-commit-golang#62 (comment) and https://golangci-lint.run/usage/linters/ * chore: bump precommit-golang * chore: run golangci-lint for modified files Enable the fast linter preset and only run it on newly-modified files, and fix problems as they arise, if the linter supports it * chore: fix line endings * chore: expllicitly set filepaths for gherkin files * chore: remove trail comma in arrays' last items * chore: add empty Go file to the root directory Golangci-lint is able to continue * chore: add Go license to empty file
1 parent 0a9cb37 commit 2ced8de

File tree

10 files changed

+29
-18
lines changed

10 files changed

+29
-18
lines changed

.pre-commit-config.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ repos:
1717
)$
1818
1919
- repo: git://github.com/dnephin/pre-commit-golang
20-
rev: v0.3.4
20+
rev: v0.3.5
2121
hooks:
2222
- id: go-fmt
2323
- id: go-lint
24-
- id: go-vet
2524
- id: no-go-testing
2625
- id: golangci-lint
26+
args: ["--fix", "--fast", "--new"]
2727

2828
- repo: [email protected]:elastic/apm-pipeline-library
2929
rev: current
@@ -44,4 +44,7 @@ repos:
4444
- id: remove-en-dashes
4545
- id: check-jjbb
4646
- id: check-gherkin-lint
47-
args: ["--disable", "AvoidOutlineForSingleExample,TooClumsy,TooLongStep,TooManyDifferentTags,TooManySteps"]
47+
args: [
48+
"--disable", "AvoidOutlineForSingleExample,TooClumsy,TooLongStep,TooManyDifferentTags,TooManySteps",
49+
"e2e/_suites/**/*.feature",
50+
]

.vscode/launch.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"program": "${workspaceFolder}/cli",
1010
"env": {
1111
"GO111MODULE": "on",
12-
"OP_LOG_LEVEL": "DEBUG",
12+
"OP_LOG_LEVEL": "DEBUG"
1313
},
1414
"args": ["run", "-h"]
1515
},
@@ -21,7 +21,7 @@
2121
"program": "${workspaceFolder}/cli",
2222
"env": {
2323
"GO111MODULE": "on",
24-
"OP_LOG_LEVEL": "DEBUG",
24+
"OP_LOG_LEVEL": "DEBUG"
2525
},
2626
"args": ["sync", "integrations", "--remote", "elastic:master"]
2727
},
@@ -33,7 +33,7 @@
3333
"program": "${workspaceFolder}/cli",
3434
"env": {
3535
"GO111MODULE": "on",
36-
"OP_LOG_LEVEL": "DEBUG",
36+
"OP_LOG_LEVEL": "DEBUG"
3737
},
3838
"args": ["run", "service", "mysql", "--version", "5.6"]
3939
},
@@ -45,7 +45,7 @@
4545
"program": "${workspaceFolder}/cli",
4646
"env": {
4747
"GO111MODULE": "on",
48-
"OP_LOG_LEVEL": "DEBUG",
48+
"OP_LOG_LEVEL": "DEBUG"
4949
},
5050
"args": ["stop", "service", "mysql", "--version", "5.6"]
5151
},
@@ -57,7 +57,7 @@
5757
"program": "${workspaceFolder}/cli",
5858
"env": {
5959
"GO111MODULE": "on",
60-
"OP_LOG_LEVEL": "DEBUG",
60+
"OP_LOG_LEVEL": "DEBUG"
6161
},
6262
"args": ["deploy", "redis", "--version", "4.0.11", "--profile", "metricbeat"]
6363
},
@@ -69,7 +69,7 @@
6969
"program": "${workspaceFolder}/cli",
7070
"env": {
7171
"GO111MODULE": "on",
72-
"OP_LOG_LEVEL": "DEBUG",
72+
"OP_LOG_LEVEL": "DEBUG"
7373
},
7474
"args": ["undeploy", "redis", "--profile", "metricbeat"]
7575
},
@@ -81,7 +81,7 @@
8181
"program": "${workspaceFolder}/cli",
8282
"env": {
8383
"GO111MODULE": "on",
84-
"OP_LOG_LEVEL": "DEBUG",
84+
"OP_LOG_LEVEL": "DEBUG"
8585
},
8686
"args": ["run", "profile", "metricbeat", "-v", "7.5.0", "--withServices", "apache:2.2,redis:3.2.12"]
8787
},
@@ -93,7 +93,7 @@
9393
"program": "${workspaceFolder}/cli",
9494
"env": {
9595
"GO111MODULE": "on",
96-
"OP_LOG_LEVEL": "DEBUG",
96+
"OP_LOG_LEVEL": "DEBUG"
9797
},
9898
"args": ["stop", "profile", "metricbeat"]
9999
},
@@ -105,7 +105,7 @@
105105
"program": "${file}",
106106
"env": {
107107
"GO111MODULE": "on",
108-
"OP_LOG_LEVEL": "DEBUG",
108+
"OP_LOG_LEVEL": "DEBUG"
109109
},
110110
"args": ["--godog.format", "pretty", "metricbeat"]
111111
}

cli/Building.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ The `build-cli.sh` script builds the binary based on a few environment variables
77
$ GOOS=("darwin" "linux" "windows") ./.ci/scripts/build-cli.sh
88
# and/or
99
$ GOARCH=("386" "amd64") ./.ci/scripts/build-cli.sh
10-
```
10+
```

cli/LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
or more contributor license agreements. Licensed under the Elastic License;
3-
you may not use this file except in compliance with the Elastic License.
3+
you may not use this file except in compliance with the Elastic License.

doc.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
5+
package main

e2e/LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
or more contributor license agreements. Licensed under the Elastic License;
3-
you may not use this file except in compliance with the Elastic License.
3+
you may not use this file except in compliance with the Elastic License.

e2e/_suites/metricbeat/configurations/vsphere.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ metricbeat.modules:
99
hosts: ["https://vsphere:443/sdk"]
1010
username: "user"
1111
password: "pass"
12-
insecure: true
12+
insecure: true

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/elastic/e2e-testing
2+
3+
go 1.14

notice/NOTICE.txt.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ Third party libraries used by the Elastic Beats project:
2727
Indirect dependencies
2828

2929
{{ template "depInfo" .Indirect }}
30-
{{ end }}
30+
{{ end }}

notice/rules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
"EPL-1.0",
1616
"GPL-3.0"
1717
]
18-
}
18+
}

0 commit comments

Comments
 (0)