-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update `golangci` file accordingly and reenable multiple linters Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `gofmt` linter Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `gci` linter Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `gofumpt` linter Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `whitespace` linter Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `whitespace` and `unconvert` linters Signed-off-by: Arrobo, Gabriel <[email protected]> * Enable `predeclared` linter Signed-off-by: Arrobo, Gabriel <[email protected]> * Update `.gitignore` file Signed-off-by: Arrobo, Gabriel <[email protected]> * Remove unused file Signed-off-by: Arrobo, Gabriel <[email protected]> * Address linter issues in sub-module Signed-off-by: Arrobo, Gabriel <[email protected]> --------- Signed-off-by: Arrobo, Gabriel <[email protected]>
- Loading branch information
1 parent
255d8c7
commit 5060448
Showing
23 changed files
with
222 additions
and
258 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024 Intel Corporation | ||
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <[email protected]> | ||
# Copyright 2019 free5GC.org | ||
# | ||
|
@@ -28,19 +29,6 @@ run: | |
# default is true. Enables skipping of directories: | ||
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ | ||
skip-dirs-use-default: true | ||
# which files to skip: they will be analyzed, but issues from them | ||
# won't be reported. Default value is empty list, but there is | ||
# no need to include all autogenerated files, we confidently recognize | ||
# autogenerated files. If it's not please let us know. | ||
# "/" will be replaced by current OS file path separator to properly work | ||
# on Windows. | ||
skip-files: | ||
- "api_.*\\.go$" | ||
- "model_.*\\.go$" | ||
- "routers.go" | ||
- "client.go" | ||
- "configuration.go" | ||
- "nas.go" | ||
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": | ||
# If invoked with -mod=readonly, the go command is disallowed from the implicit | ||
# automatic updating of go.mod described above. Instead, it fails when any changes | ||
|
@@ -56,7 +44,7 @@ run: | |
# output configuration options | ||
output: | ||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" | ||
format: colored-line-number | ||
formats: colored-line-number | ||
# print lines of code with issue, default is true | ||
print-issued-lines: true | ||
# print linter name in the end of issue text, default is true | ||
|
@@ -99,7 +87,7 @@ linters-settings: | |
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run` | ||
# By default list of stable checks is used. | ||
enabled-checks: | ||
# - rangeValCopy | ||
#- rangeValCopy | ||
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty | ||
disabled-checks: | ||
- regexpMust | ||
|
@@ -139,29 +127,31 @@ linters-settings: | |
# minimal confidence for issues, default is 0.8 | ||
min-confidence: 0.8 | ||
gomnd: | ||
settings: | ||
mnd: | ||
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description. | ||
checks: argument,case,condition,operation,return,assign | ||
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description. | ||
checks: | ||
- argument | ||
- case | ||
- condition | ||
- operation | ||
- return | ||
- assign | ||
gomodguard: | ||
allowed: | ||
modules: # List of allowed modules | ||
# - gopkg.in/yaml.v2 | ||
# - gopkg.in/yaml.v2 | ||
domains: # List of allowed module domains | ||
# - golang.org | ||
# - golang.org | ||
blocked: | ||
modules: # List of blocked modules | ||
# - github.com/uudashr/go-module: # Blocked module | ||
# recommendations: # Recommended modules that should be used instead (Optional) | ||
# - golang.org/x/mod | ||
# reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional) | ||
# - github.com/uudashr/go-module: # Blocked module | ||
# recommendations: # Recommended modules that should be used instead (Optional) | ||
# - golang.org/x/mod | ||
# reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional) | ||
versions: # List of blocked module version constraints | ||
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint | ||
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional) | ||
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint | ||
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional) | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: true | ||
# settings per analyzer | ||
settings: | ||
printf: # analyzer name, run `go tool vet help` to see all analyzers | ||
|
@@ -170,12 +160,10 @@ linters-settings: | |
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf | ||
# enable or disable analyzers by name | ||
enable: | ||
- atomicalign | ||
enable-all: false | ||
# enable all analyzers | ||
enable-all: true | ||
disable: | ||
- shadow | ||
- fieldalignment | ||
disable-all: false | ||
depguard: | ||
list-type: blacklist | ||
|
@@ -209,8 +197,6 @@ linters-settings: | |
whitespace: | ||
multi-if: false # Enforces newlines (or comments) after every multi-line if statement | ||
multi-func: false # Enforces newlines (or comments) after every multi-line function signature | ||
gci: | ||
local-prefixes: "bitbucket.org" | ||
misspell: | ||
#locale: US | ||
ignore-words: | ||
|
@@ -234,38 +220,36 @@ linters-settings: | |
# Allow leading comments to be separated with empty liens | ||
allow-separated-leading-comment: false | ||
custom: | ||
# Each custom linter should have a unique name. | ||
# Each custom linter should have a unique name. | ||
|
||
linters: | ||
enable: | ||
# - gofmt | ||
- gofmt | ||
# - govet | ||
# - errcheck | ||
# - staticcheck | ||
# - unused | ||
# - gosimple | ||
# - ineffassign | ||
# - typecheck | ||
- unused | ||
- gosimple | ||
- ineffassign | ||
- typecheck | ||
# Additional | ||
# - lll | ||
# - godox | ||
# - gomnd | ||
# - goconst | ||
- godox | ||
# - mnd | ||
- goconst | ||
# - gocognit | ||
# - maligned | ||
# - nestif | ||
# - gomodguard | ||
# - nakedret | ||
# - gci | ||
# - misspell | ||
# - gofumpt | ||
# - whitespace | ||
# - unconvert | ||
# - predeclared | ||
# - noctx | ||
# - dogsled | ||
- nakedret | ||
- gci | ||
- misspell | ||
- gofumpt | ||
- whitespace | ||
- unconvert | ||
- predeclared | ||
- noctx | ||
- dogsled | ||
# - bodyclose | ||
# - asciicheck | ||
- asciicheck | ||
# - stylecheck | ||
# - unparam | ||
# - wsl | ||
|
@@ -280,7 +264,7 @@ issues: | |
exclude: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
# Exclude some linters from running on tests files. | ||
# Exclude some linters from running on tests files. | ||
# Independently from option `exclude` we use default exclude patterns, | ||
# it can be disabled by this option. To list all | ||
# excluded by default patterns execute `golangci-lint run --help`. | ||
|
@@ -291,7 +275,7 @@ issues: | |
exclude-case-sensitive: false | ||
# The list of ids of default excludes to include or disable. By default it's empty. | ||
include: | ||
#- EXC0002 # disable excluding of issues about comments from golint | ||
#- EXC0002 # disable excluding of issues about comments from golint | ||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50. | ||
#max-issues-per-linter: 0 | ||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3. | ||
|
@@ -327,5 +311,5 @@ severity: | |
# Only affects out formats that support setting severity information. | ||
rules: | ||
- linters: | ||
- gomnd | ||
- gomnd | ||
severity: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.