This project is read-only.

Violation namespace in StyleCop output

Feb 15, 2013 at 7:27 PM
Currently we cut "StyleCop" from violation namespace so output looks like "SAXXXX : CSharp.Naming : Some text here".
Can we cut everything but the last part of namespace: "SAXXXX : Naming : Some text here"?

I have some custom analyzers with different namespaces but would like to see all output in the same style, and not "XX1234 : MyAnalyzer.Naming : Some text here".

Change to StyleCopTask.cs for this:
string trimmedNamespace = e.Violation.Rule.Namespace;
trimmedNamespace = trimmedNamespace.SubstringAfterLast('.');
trimmedNamespace = trimmedNamespace.SubstringBeforeLast("Rules", StringComparison.Ordinal);

string description = string.Concat(e.Violation.Rule.CheckId, " : ", trimmedNamespace, " : ", e.Message);
Can we do it?