Skip to content
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

Fix lint, pin its version and other minor fixes #852

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .openshiftci/install-golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export OUTPUT=bin/golangci-lint

if [ ! -f "$OUTPUT" ]
then
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.55.1
fi
4 changes: 2 additions & 2 deletions cmd/gendoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var (
reGather = regexp.MustCompile(`^((Build)?Gather)(.*)`)
reExample = regexp.MustCompile(`^(Example)(.*)`)
reSampleArchive = regexp.MustCompile(`docs/(insights-archive-sample/.*)`)
cleanRoot = "./"
)

type DocBlock struct {
Expand All @@ -44,7 +45,6 @@ func main() {
return
}
defer mdf.Close()
cleanRoot := "./"

md := map[string]*DocBlock{}
err = walkDir(cleanRoot, md)
Expand Down Expand Up @@ -312,7 +312,7 @@ func execExampleMethod(methodFullPackage, methodPackage, methodName string) (str
}

// nolint: gosec
cmd := exec.Command("go", "run", "./"+f)
cmd := exec.Command("go", "run", fmt.Sprintf("%s%s", cleanRoot, f))
output, err := cmd.CombinedOutput()

return string(output), err
Expand Down
6 changes: 3 additions & 3 deletions docs/gathered-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Collects the cluster `Infrastructure` with cluster name.
- https://docs.openshift.com/container-platform/4.3/rest_api/index.html#infrastructure-v1-config-openshift-io

### Sample data
- [docs/insights-archive-sample/config/infrastructure/.json](./insights-archive-sample/config/infrastructure/.json)
- [docs/insights-archive-sample/config/infrastructure.json](./insights-archive-sample/config/infrastructure.json)

### Location in archive
- `config/infrastructure.json`
Expand Down Expand Up @@ -832,7 +832,7 @@ It also collects total number of all `InstallPlans` and all non-unique `InstallP
- https://github.com/operator-framework/api/blob/master/pkg/operators/v1alpha1/installplan_types.go#L26

### Sample data
- [docs/insights-archive-sample/config/instalplans.json](./insights-archive-sample/config/instalplans.json)
- [docs/insights-archive-sample/config/installplans.json](./insights-archive-sample/config/installplans.json)

### Location in archive
- `config/instalplans.json`
Expand Down Expand Up @@ -1338,7 +1338,7 @@ following data:
None

### Sample data
- [docs/insights-archive-sample/config/olm_operators](./insights-archive-sample/config/olm_operators)
- [docs/insights-archive-sample/config/olm_operators.json](./insights-archive-sample/config/olm_operators.json)

### Location in archive
- `config/olm_operators`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
// - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#infrastructure-v1-config-openshift-io
//
// ### Sample data
// - docs/insights-archive-sample/config/infrastructure/.json
// - docs/insights-archive-sample/config/infrastructure.json
//
// ### Location in archive
// - `config/infrastructure.json`
Expand Down
2 changes: 1 addition & 1 deletion pkg/gatherers/clusterconfig/gather_install_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type installPlanAnonymizer struct {
// - https://github.com/operator-framework/api/blob/master/pkg/operators/v1alpha1/installplan_types.go#L26
//
// ### Sample data
// - docs/insights-archive-sample/config/instalplans.json
// - docs/insights-archive-sample/config/installplans.json
//
// ### Location in archive
// - `config/instalplans.json`
Expand Down
2 changes: 1 addition & 1 deletion pkg/gatherers/clusterconfig/gather_olm_operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type csvRef struct {
// None
//
// ### Sample data
// - docs/insights-archive-sample/config/olm_operators
// - docs/insights-archive-sample/config/olm_operators.json
//
// ### Location in archive
// - `config/olm_operators`
Expand Down