Skip to content

Commit

Permalink
Rename organization (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
edcdavid authored Aug 8, 2024
1 parent 76dc181 commit b0c0dda
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 34 deletions.
56 changes: 32 additions & 24 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,18 +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
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exhaustive
- exportloopref
Expand All @@ -64,51 +58,65 @@ linters:
- gocyclo
- gofmt
- goimports
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- revive
- rowserrcheck
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- 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 @@ -122,6 +130,6 @@ issues:
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.51.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"
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/test-network-function/graphsolver-lib
module github.com/redhat-best-practices-for-k8s/graphsolver-lib

go 1.21.4
go 1.22.5

toolchain go1.22.6

require (
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.4
github.com/sirupsen/logrus v1.9.3
github.com/test-network-function/graphsolver-exports v0.0.1
github.com/test-network-function/l2discovery-exports v0.0.3
)

require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2 h1:SJnXD40jEFBCWT8ZjmJOFJdIzMwWPbrIUCAQu1oXfYQ=
github.com/redhat-best-practices-for-k8s/graphsolver-exports v0.0.2/go.mod h1:Vl268nAHQKEnIw7GIYehp3Lx4qYP8+rOlwGsWxD/aO4=
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.4 h1:66qE0Vj/8vWvt8yaVq1yJK5+OOELGZdlCwzHkXRxFr4=
github.com/redhat-best-practices-for-k8s/l2discovery-exports v0.0.4/go.mod h1:NO9mpaj5neVKarRGcsL5SHVFb+uYUoCC8uVbuT419xs=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/test-network-function/graphsolver-exports v0.0.1 h1:27zhW/1fiKf3+NJsevl+jvuJu9t/MqOs1wmAkcmp8ng=
github.com/test-network-function/graphsolver-exports v0.0.1/go.mod h1:Zo5bUPq3s1KWfz6MtMHzHQh1mSiW4DOpBbZ03TG2zIw=
github.com/test-network-function/l2discovery-exports v0.0.3 h1:kuzpWu5UQL3VIG+8AkjmsghkjZN1X3k3dQ8M36DsJc4=
github.com/test-network-function/l2discovery-exports v0.0.3/go.mod h1:38JgpFHXB9PQ+4bPZQ+STsUKK9BrTe+5uDq47OeMV50=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions lib.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package lib

import (
export "github.com/redhat-best-practices-for-k8s/graphsolver-exports"
l2lib "github.com/redhat-best-practices-for-k8s/l2discovery-exports"
"github.com/sirupsen/logrus"
export "github.com/test-network-function/graphsolver-exports"
l2lib "github.com/test-network-function/l2discovery-exports"
)

var GlobalConfig = configObject{}
Expand Down

0 comments on commit b0c0dda

Please sign in to comment.