mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 02:28:05 +00:00
14 lines
579 B
YAML
14 lines
579 B
YAML
# QuanTAlib: Require nameof() in ArgumentException
|
|
# DCT rule: ArgumentException + nameof(param) for proper analyzer support
|
|
|
|
id: require-nameof-in-exceptions
|
|
language: csharp
|
|
severity: warning
|
|
message: "Use nameof(parameter) instead of string literal in ArgumentException for refactoring safety"
|
|
note: "MA0015-friendly: nameof() ensures parameter name stays in sync during refactoring"
|
|
rule:
|
|
any:
|
|
- pattern: throw new ArgumentException($MSG, "$PARAM")
|
|
- pattern: throw new ArgumentNullException("$PARAM")
|
|
- pattern: throw new ArgumentOutOfRangeException("$PARAM")
|