Closed iRon7 closed 9 months ago
I disagree, the custom rule needs to return the id. PSSA should not auto-generate them because if that ever has to change, one cannot change it because people already rely on that.
Good point.
Aside from this, I don't thick that using the GetHashCode()
method for this is a good idea as it might return different values for the same string content #46406
.
For something like this it is probably better to create a MD5
hash and also consider the case (.toUpper()
) and diacritics.
I have closed this issue and create a new request for a rule to check for a dynamic RuleSuppressionID
(#1964)
Rules that return a long
extent
property (as e.g. a[ScriptBlock]
expression) often have noRuleSuppressionID
Which means that one isn't able to suppress that specific warning (byRuleSuppressionID
) and still validate similar occurences with a differedRuleSuppressionID
.Purposed solution
When a (custom) rule doesn't return a
RuleSuppressionID
the engine could technically always add a uniqueRuleSuppressionID
by fabricating (and validating) one using the hashcode of the returnedExtent.Text
. Basically: