Skip to content

Commit

Permalink
Renaming organization (#15)
Browse files Browse the repository at this point in the history
Also updated golangci config file
  • Loading branch information
edcdavid authored Aug 8, 2024
1 parent 80b01a9 commit 3a66934
Show file tree
Hide file tree
Showing 10 changed files with 1,597 additions and 237 deletions.
54 changes: 32 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ linters-settings:
dupl:
threshold: 100
funlen:
lines: 50
statements: 30
gci:
local-prefixes: github.com/golangci/golangci-lint
lines: 60
statements: 45
goconst:
min-len: 4
min-occurrences: 2
Expand All @@ -19,16 +17,13 @@ linters-settings:
disabled-checks:
- whyNoLint
gocyclo:
min-complexity: 15
goimports:
local-prefixes: github.com/golangci/golangci-lint
gomnd:
min-complexity: 20
mnd:
settings:
mnd:
# don't include the "operation" and "assign"
# do not include the "operation" and "assign"
checks: argument,case,condition,return
govet:
check-shadowing: true
settings:
printf:
funcs:
Expand All @@ -43,17 +38,17 @@ linters-settings:
nolintlint:
allow-leading-space: false # disallow leading spaces. A space means the //nolint comment shows in `godoc` output.
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-explanation: false # do not require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
exhaustive:
default-signifies-exhaustive: true
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exhaustive
- exportloopref
Expand All @@ -63,18 +58,15 @@ linters:
- gocyclo
- gofmt
- goimports
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- revive
- rowserrcheck
- staticcheck
- stylecheck
Expand All @@ -83,30 +75,48 @@ linters:
- unparam
- unused
- whitespace
# don't enable:
# do not enable:
# - asciicheck
# - depguard
# - dupl
# - gochecknoglobals
# - gochecknoinits
# - gocognit
# - godot
# - godox
# - goerr113
# - maligned
# - nakedret
# - nestif
# - noctx
# - prealloc
# - revive
# - exportloopref
# - structcheck
# - testpackage
# - wsl
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Ignore magic numbers and inline strings in tests.
# Ignore magic numbers, inline strings and function length in tests.
- path: _test\.go
linters:
- gomnd
- mnd
- goconst
# Ignore line length for string assignments (don't try and wrap regex definitions)
- funlen
- path: config/config.go
linters:
- mnd
- path: _scaling.go
linters:
- gocritic
- path: hugepages.go
linters:
- mnd
- path: scheduling.go
linters:
- mnd
# Ignore line length for string assignments (do not try and wrap regex definitions)
- linters:
- lll
source: "^(.*= (\".*\"|`.*`))$"
Expand All @@ -120,6 +130,6 @@ issues:
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.54.x # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.59.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
4 changes: 2 additions & 2 deletions examples/basic/basic.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
l2lib "github.com/test-network-function/l2discovery/l2lib/pkg/export"
"github.com/test-network-function/simplegraphsolver/pkg/lib"
l2lib "github.com/redhat-best-practices-for-k8s/l2discovery/l2lib/pkg/export"
"github.com/redhat-best-practices-for-k8s/simplegraphsolver/pkg/lib"
)

type testGraph struct {
Expand Down
19 changes: 2 additions & 17 deletions examples/basic/go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
module github.com/test-network-function/simplegraphsolver/examples/basic
module github.com/redhat-best-practices-for-k8s/simplegraphsolver/examples/basic

go 1.21.3
go 1.22.5

replace github.com/test-network-function/simplegraphsolver/pkg/lib => ../../pkg/lib

replace github.com/test-network-function/simplegraphsolver/pkg/export => ../../pkg/export

//replace github.com/test-network-function/l2discovery/l2lib/pkg/export => ../../../l2discoverydavid/l2lib/pkg/export

require (
github.com/test-network-function/l2discovery/l2lib/pkg/export v0.0.0-00010101000000-000000000000
github.com/test-network-function/simplegraphsolver/pkg/lib v0.0.0-00010101000000-000000000000
)

require (
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/test-network-function/simplegraphsolver/pkg/export v0.0.0-00010101000000-000000000000 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
)
106 changes: 56 additions & 50 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,75 +1,81 @@
module github.com/test-network-function/l2discovery-examples
module github.com/redhat-best-practices-for-k8s/l2discovery-examples

go 1.21.3
go 1.22.5

replace k8s.io/client-go => k8s.io/client-go v0.29.7

require (
github.com/openshift/ptp-operator v0.0.0-20220922002031-4e588c96d5d6
github.com/test-network-function/graphsolver-lib v0.0.3
github.com/test-network-function/l2discovery-lib v0.0.9
github.com/openshift/ptp-operator v0.0.0-20240719170405-a3502a34dbd8
github.com/redhat-best-practices-for-k8s/graphsolver-lib v0.0.4
github.com/redhat-best-practices-for-k8s/l2discovery-lib v0.0.10
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/openshift/api v0.0.0-20220824134416-0f86a223d4bc // indirect
github.com/openshift/client-go v0.0.0-20220525160904-9e1acff93e4a // indirect
github.com/openshift/api v0.0.1 // indirect
github.com/openshift/client-go v0.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.57.0 // indirect
github.com/prometheus-operator/prometheus-operator/pkg/client v0.57.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2 // indirect
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.4 // indirect
github.com/redhat-best-practices-for-k8s/privileged-daemonset v1.0.31 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/test-network-function/graphsolver-exports v0.0.1 // indirect
github.com/test-network-function/l2discovery-exports v0.0.3 // indirect
github.com/test-network-function/privileged-daemonset v1.0.2 // indirect
github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.26.3 // indirect
k8s.io/apiextensions-apiserver v0.25.0 // indirect
k8s.io/apimachinery v0.26.3 // indirect
k8s.io/client-go v0.26.3 // indirect
k8s.io/component-base v0.25.0 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
sigs.k8s.io/controller-runtime v0.12.3 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
k8s.io/api v0.30.3 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/apimachinery v0.30.3 // indirect
k8s.io/client-go v0.30.3 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
sigs.k8s.io/controller-runtime v0.16.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 3a66934

Please sign in to comment.