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

Commit

Permalink
chore: fix issues with golangci-lint (#613) (#616)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mdelapenya authored Jan 19, 2021
1 parent f1c3a73 commit bf09f34
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repos:
)$
- repo: git://github.com/dnephin/pre-commit-golang
rev: v0.3.4
rev: v0.3.5
hooks:
- id: go-fmt
- id: go-lint
- id: go-vet
- id: no-go-testing
- id: golangci-lint
args: ["--fix", "--fast", "--new"]

- repo: [email protected]:elastic/apm-pipeline-library
rev: current
Expand All @@ -44,4 +44,7 @@ repos:
- id: remove-en-dashes
- id: check-jjbb
- id: check-gherkin-lint
args: ["--disable", "AvoidOutlineForSingleExample,TooClumsy,TooLongStep,TooManyDifferentTags,TooManySteps"]
args: [
"--disable", "AvoidOutlineForSingleExample,TooClumsy,TooLongStep,TooManyDifferentTags,TooManySteps",
"e2e/_suites/**/*.feature",
]
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["run", "-h"]
},
Expand All @@ -21,7 +21,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["sync", "integrations", "--remote", "elastic:master"]
},
Expand All @@ -33,7 +33,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["run", "service", "mysql", "--version", "5.6"]
},
Expand All @@ -45,7 +45,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["stop", "service", "mysql", "--version", "5.6"]
},
Expand All @@ -57,7 +57,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["deploy", "redis", "--version", "4.0.11", "--profile", "metricbeat"]
},
Expand All @@ -69,7 +69,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["undeploy", "redis", "--profile", "metricbeat"]
},
Expand All @@ -81,7 +81,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["run", "profile", "metricbeat", "-v", "7.5.0", "--withServices", "apache:2.2,redis:3.2.12"]
},
Expand All @@ -93,7 +93,7 @@
"program": "${workspaceFolder}/cli",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["stop", "profile", "metricbeat"]
},
Expand All @@ -105,7 +105,7 @@
"program": "${file}",
"env": {
"GO111MODULE": "on",
"OP_LOG_LEVEL": "DEBUG",
"OP_LOG_LEVEL": "DEBUG"
},
"args": ["--godog.format", "pretty", "metricbeat"]
}
Expand Down
2 changes: 1 addition & 1 deletion cli/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The `build-cli.sh` script builds the binary based on a few environment variables
$ GOOS=("darwin" "linux" "windows") ./.ci/scripts/build-cli.sh
# and/or
$ GOARCH=("386" "amd64") ./.ci/scripts/build-cli.sh
```
```
2 changes: 1 addition & 1 deletion cli/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
or more contributor license agreements. Licensed under the Elastic License;
you may not use this file except in compliance with the Elastic License.
you may not use this file except in compliance with the Elastic License.
5 changes: 5 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package main
2 changes: 1 addition & 1 deletion e2e/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
or more contributor license agreements. Licensed under the Elastic License;
you may not use this file except in compliance with the Elastic License.
you may not use this file except in compliance with the Elastic License.
2 changes: 1 addition & 1 deletion e2e/_suites/metricbeat/configurations/vsphere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metricbeat.modules:
hosts: ["https://vsphere:443/sdk"]
username: "user"
password: "pass"
insecure: true
insecure: true
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/elastic/e2e-testing

go 1.14
2 changes: 1 addition & 1 deletion notice/NOTICE.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Third party libraries used by the Elastic Beats project:
Indirect dependencies

{{ template "depInfo" .Indirect }}
{{ end }}
{{ end }}
2 changes: 1 addition & 1 deletion notice/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"EPL-1.0",
"GPL-3.0"
]
}
}

0 comments on commit bf09f34

Please sign in to comment.