Release 1.0

New Rules

Rule IDCategorySeverityNotes
LuceneDev1000DesignWarningFloating point types should not be compared for exact equality
LuceneDev1001DesignWarningFloating point types should be formatted with J2N methods
LuceneDev1002DesignWarningFloating point type arithmetic needs to be checked
LuceneDev1003DesignWarningMethod parameters that accept array types should be analyzed to determine whether they are better suited to be ref or out parameters
LuceneDev1004DesignWarningMethods that return array types should be analyzed to determine whether they are better suited to be one or more out parameters or to return a ValueTuple
LuceneDev1005DesignWarningTypes in the Lucene.Net.Support namespace should not be public
LuceneDev1006DesignWarningFloating point values embedded in strings should be formatted with J2N.Numerics Single or Double ToString methods
LuceneDev1007DesignWarningGeneric Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (value type value)
LuceneDev1008DesignWarningGeneric Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (reference type value)
LuceneDev2000GlobalizationWarningNumeric Parse/TryParse without IFormatProvider; specify CultureInfo.InvariantCulture (or CurrentCulture) explicitly
LuceneDev2001GlobalizationWarningNumeric ToString/TryFormat without IFormatProvider; specify CultureInfo.InvariantCulture (or CurrentCulture) explicitly
LuceneDev2002GlobalizationWarningSystem.Convert numeric to/from string without IFormatProvider; specify CultureInfo.InvariantCulture (or CurrentCulture) explicitly
LuceneDev2003GlobalizationWarningstring.Format with numeric argument and no IFormatProvider; pass CultureInfo.InvariantCulture (or CurrentCulture) as the first argument
LuceneDev2004GlobalizationWarningJ2N.Numerics.* method without IFormatProvider; specify CultureInfo.InvariantCulture (or CurrentCulture) explicitly
LuceneDev2005GlobalizationWarningNumeric value concatenated with string formats using current culture; wrap with .ToString(CultureInfo.InvariantCulture) explicitly
LuceneDev2006GlobalizationWarningNumeric value interpolated into string formats using current culture; use FormattableString.Invariant or wrap with .ToString(CultureInfo.InvariantCulture) explicitly
LuceneDev2007GlobalizationWarningNumeric format/parse passes a non-invariant IFormatProvider; suppress when intentional
LuceneDev2008GlobalizationDisabledNumeric format/parse passes CultureInfo.InvariantCulture (review-sweep aid; default Info severity, disabled by default)
LuceneDev4000PerformanceWarning[MethodImpl(MethodImplOptions.NoInlining)] has no effect on interface or abstract methods (the attribute is not inherited)
LuceneDev4001PerformanceWarning[MethodImpl(MethodImplOptions.NoInlining)] should not be used on empty-bodied methods (no benefit, harms performance)
LuceneDev4002PerformanceWarningMethods referenced by the 2-argument StackTraceHelper.DoesStackTraceContainMethod overload should be marked [MethodImpl(MethodImplOptions.NoInlining)] when the method body is non-empty
LuceneDev6000UsageInfoIDictionary indexer may be used to retrieve values, but must be checked for null before using the value
LuceneDev6001UsageErrorMissing StringComparison argument in String overloads of StartsWith/EndsWith/IndexOf/LastIndexOf; must use Ordinal/OrdinalIgnoreCase
LuceneDev6002UsageErrorInvalid StringComparison value in String overloads of StartsWith/EndsWith/IndexOf/LastIndexOf; only Ordinal/OrdinalIgnoreCase allowed
LuceneDev6003UsageWarningRedundant StringComparison.Ordinal argument in Span overloads of StartsWith/EndsWith/IndexOf/LastIndexOf; should be removed
LuceneDev6004UsageErrorInvalid StringComparison value in Span overloads of StartsWith/EndsWith/IndexOf/LastIndexOf; only Ordinal or OrdinalIgnoreCase allowed
LuceneDev6005UsageInfoSingle-character string arguments should use the char overload of StartsWith/EndsWith/IndexOf/LastIndexOf instead of a string