mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-10 04:30:20 +02:00
chore(lint): review exclude rules
This commit is contained in:
+8
-20
@@ -7,38 +7,26 @@ issues:
|
|||||||
- path: _test\.go
|
- path: _test\.go
|
||||||
linters:
|
linters:
|
||||||
- dupl
|
- dupl
|
||||||
- maligned
|
|
||||||
- goerr113
|
- goerr113
|
||||||
- containedctx
|
- containedctx
|
||||||
- path: internal/server/
|
- path: "internal\\/server\\/.+\\.go"
|
||||||
linters:
|
linters:
|
||||||
- dupl
|
- dupl
|
||||||
- path: internal/configuration/
|
- path: "internal\\/configuration\\/settings\\/.+\\.go"
|
||||||
linters:
|
linters:
|
||||||
- dupl
|
- dupl
|
||||||
- path: internal/constants/
|
- text: "^mnd: Magic number: 0[0-9]{3}, in <argument> detected$"
|
||||||
linters:
|
source: "^.+= os\\.OpenFile\\(.+, .+, 0[0-9]{3}\\)"
|
||||||
- dupl
|
|
||||||
- text: "exported: exported var Err*"
|
|
||||||
linters:
|
|
||||||
- revive
|
|
||||||
- text: "mnd: Magic number: 0644*"
|
|
||||||
linters:
|
linters:
|
||||||
- gomnd
|
- gomnd
|
||||||
- text: "mnd: Magic number: 0400*"
|
|
||||||
|
- text: "^mnd: Magic number: 0[0-9]{3}, in <argument> detected$"
|
||||||
|
source: "^.+= os\\.MkdirAll\\(.+, 0[0-9]{3}\\)"
|
||||||
linters:
|
linters:
|
||||||
- gomnd
|
- gomnd
|
||||||
- text: "variable 'mssFix' is only used in the if-statement*"
|
|
||||||
path: "openvpnconf.go"
|
|
||||||
linters:
|
|
||||||
- ifshort
|
|
||||||
- text: "variable 'auth' is only used in the if-statement*"
|
|
||||||
path: "openvpnconf.go"
|
|
||||||
linters:
|
|
||||||
- ifshort
|
|
||||||
- linters:
|
- linters:
|
||||||
- lll
|
- lll
|
||||||
source: "^//go:generate "
|
source: "^//go:generate .+$"
|
||||||
- text: "returns interface \\(github\\.com\\/vishvananda\\/netlink\\.Link\\)"
|
- text: "returns interface \\(github\\.com\\/vishvananda\\/netlink\\.Link\\)"
|
||||||
linters:
|
linters:
|
||||||
- ireturn
|
- ireturn
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
// Create creates a TUN device at the path specified.
|
// Create creates a TUN device at the path specified.
|
||||||
func (t *Tun) Create(path string) error {
|
func (t *Tun) Create(path string) error {
|
||||||
parentDir := filepath.Dir(path)
|
parentDir := filepath.Dir(path)
|
||||||
if err := os.MkdirAll(parentDir, 0751); err != nil { //nolint:gomnd
|
if err := os.MkdirAll(parentDir, 0751); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user