bhirsz / robotframework-cop-academy

Tool for static code analysis and formatting of Robot Framework language
Apache License 2.0
2 stars 0 forks source link

Separate severity from the rule id #19

Open bhirsz opened 5 hours ago

bhirsz commented 5 hours ago

Rule id is often used with its severity: missing-doc-keyword / W0201 . To allow to filtering it, we are normalizing rule ids so it's possible to:

robocop --include W0201
robocop --include 0201

Hovewer it may be difficult to normalize rule ids with #18 implemented. Upon consideration I think it's better to not use severity together with rule id. Severity is configurable so even if by default 0201 rule is Warning, it can be configured to be an error. That's why it does not make sense to keep it as part of unique name.

bhirsz commented 4 hours ago

Additionaly, when raporting issues, severity is used separaretely:

"{source}:{line}:{col} [{severity}] {rule_id} {desc} ({name})"

Because severity is 'cut' from rule_id anyway, we add it to issue separetely