chore: remove 'nolint' comments

This commit is contained in:
Henrique Dias 2025-11-15 09:01:21 +01:00
parent 17f1e08a58
commit 23c4e4565b
No known key found for this signature in database
19 changed files with 29 additions and 38 deletions

View file

@ -9,7 +9,6 @@ import (
var assets embed.FS
var commonPasswords map[string]struct{}
//nolint:gochecknoinits
func init() {
// Password list sourced from:
// https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/100k-most-used-passwords-NCSC.txt

View file

@ -63,7 +63,7 @@ func (s *Storage) Gets(baseScope string) ([]*User, error) {
}
for _, user := range users {
if err := user.Clean(baseScope); err != nil { //nolint:govet
if err := user.Clean(baseScope); err != nil {
return nil, err
}
}

View file

@ -55,8 +55,6 @@ var checkableFields = []string{
// Clean cleans up a user and verifies if all its fields
// are alright to be saved.
//
//nolint:gocyclo
func (u *User) Clean(baseScope string, fields ...string) error {
if len(fields) == 0 {
fields = checkableFields
@ -93,7 +91,7 @@ func (u *User) Clean(baseScope string, fields ...string) error {
if u.Fs == nil {
scope := u.Scope
scope = filepath.Join(baseScope, filepath.Join("/", scope)) //nolint:gocritic
scope = filepath.Join(baseScope, filepath.Join("/", scope))
u.Fs = afero.NewBasePathFs(afero.NewOsFs(), scope)
}