Fix S1003 violations and drop suppression

This commit is contained in:
Tamir Duberstein
2026-02-10 11:56:11 -08:00
parent 8016912676
commit e2896eb67c
2 changed files with 1 additions and 5 deletions
-4
View File
@@ -239,10 +239,6 @@ analyzers:
# See above.
- "symbol \"runtime_pollWaitCanceled\".*"
- "symbol \"runtime_procPin\".*"
S1003: # Replace index+len check with strings.Contains
# disabled for now due to existing violations.
internal:
exclude: [".*"]
S1004: # Simplify bytes.Compare(...) != 0 into bytes.Equal(...)
# disabled for now due to existing violations.
internal:
+1 -1
View File
@@ -112,7 +112,7 @@ func (vfs *VirtualFilesystem) getFilesystemType(name string) *registeredFilesyst
fsname := name
// Fetch a meaningful part of name if there is a dot in the name
// and use left part of a string as fname.
if strings.Index(name, ".") != -1 {
if strings.Contains(name, ".") {
fsname = strings.Split(name, ".")[0]
}
return vfs.fsTypes[fsname]