Reduce confidence in error string leading capital check.
People often use proper nouns or exported Go identifiers in error strings,
which reduces the SNR for this check.
diff --git a/lint.go b/lint.go
index 54907f8..84518fc 100644
--- a/lint.go
+++ b/lint.go
@@ -830,7 +830,13 @@
default:
return true
}
- f.errorf(str, 0.8, styleGuideBase+"#Error_Strings", msg)
+ // People use proper nouns and exported Go identifiers in error strings,
+ // so decrease the confidence of warnings for capitalization.
+ conf := 0.8
+ if isCap {
+ conf = 0.6
+ }
+ f.errorf(str, conf, styleGuideBase+"#Error_Strings", msg)
return true
})
}