Skip to content

Commit 8676d27

Browse files
committed
Fix nolint issues
Reference -> https://golangci-lint.run/usage/false-positives/#nolint-directive Signed-off-by: Ulysses Souza <[email protected]>
1 parent 86da918 commit 8676d27

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dotenv/godotenv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func Marshal(envMap map[string]string) (string, error) {
183183
if d, err := strconv.Atoi(v); err == nil {
184184
lines = append(lines, fmt.Sprintf(`%s=%d`, k, d))
185185
} else {
186-
lines = append(lines, fmt.Sprintf(`%s="%s"`, k, doubleQuoteEscape(v))) // nolint Cannot use %q here
186+
lines = append(lines, fmt.Sprintf(`%s="%s"`, k, doubleQuoteEscape(v))) //nolint // Cannot use %q here
187187
}
188188
}
189189
sort.Strings(lines)

loader/loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ func resolveEnvironment(serviceConfig *types.ServiceConfig, workingDir string, l
637637
}
638638

639639
// Do not defer to avoid it inside a loop
640-
file.Close() // nolint:errcheck
640+
file.Close() //nolint:errcheck
641641

642642
fileVars, err := dotenv.ParseWithLookup(bytes.NewBuffer(b), dotenv.LookupFn(lookupEnv))
643643
if err != nil {

loader/merge.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ func mergeLoggingConfig(dst, src reflect.Value) error {
299299
return nil
300300
}
301301

302-
// nolint: unparam
302+
//nolint: unparam
303303
func mergeUlimitsConfig(dst, src reflect.Value) error {
304304
if src.Interface() != reflect.Zero(reflect.TypeOf(src.Interface())).Interface() {
305305
dst.Elem().Set(src.Elem())
306306
}
307307
return nil
308308
}
309309

310-
// nolint: unparam
310+
//nolint: unparam
311311
func mergeServiceNetworkConfig(dst, src reflect.Value) error {
312312
if src.Interface() != reflect.Zero(reflect.TypeOf(src.Interface())).Interface() {
313313
dst.Elem().FieldByName("Aliases").Set(src.Elem().FieldByName("Aliases"))

loader/windows_path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func isAbs(path string) (b bool) {
4444

4545
// volumeNameLen returns length of the leading volume name on Windows.
4646
// It returns 0 elsewhere.
47-
// nolint: gocyclo
47+
//nolint: gocyclo
4848
func volumeNameLen(path string) int {
4949
if len(path) < 2 {
5050
return 0

0 commit comments

Comments
 (0)