-sc doesn't work (because of a typo)
Status: Beta
Brought to you by:
akutz
The -cs option does not work.
After I played around for almost a day, I inspected the source code. It turned out that there is a simple typo in the 'Main' function:
In Program.cs at line 47/48:
new StyleCopReport().ReportBuilder()
.WithStyleCopSettingsFile(cl.GetOptionValue("s"))
...
must be instead:
new StyleCopReport().ReportBuilder()
.WithStyleCopSettingsFile(cl.GetOptionValue("sc"))
...
Tip: Always use constants for values (strings, numbers or anything else) that you need more than once... ;-)
Regards
Thomas
Hi,
i corrected
WithStyleCopSettingsFile(cl.GetOptionValue("s"))
to
WithStyleCopSettingsFile(cl.GetOptionValue("sc"))
and recompiled, but still the program ignores my Settings.StyleCop.
When i debug StyleCopCmd, i can see, that the path of my Settings.StyleCop with option -sc is correctly forwarded.
Please, can anybody help me to get this bug fixed?
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I've corrected
WithStyleCopSettingsFile(cl.GetOptionValue("s"))
to
WithStyleCopSettingsFile(cl.GetOptionValue("sc"))
as well, but in addition I've referenced the newest libraries from StyleCop 4.7.33, fixed minor errors and now StyleCopCmd uses my local settings (-sc Settings.StyleCop).