These are chat archives for DotNetAnalyzers/StyleCopAnalyzers

4th
Nov 2015
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 02:03
How can I exclude a file from StyleCop analysis in VS2015? I can't seem to find any documentation on this..
Yaakov
@yaakov-h
Nov 04 2015 02:16
@ali-hk See #1430
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 04:23
Thanks @yaakov-h , it seems there's no solution for non-autogen files? That seems fairly restrictive. Also reading through the thread it seems there's an expectation that at .cs files that are autogen and are in the obj folder have an autogen header which is a poor assumption to make. Not sure if the code is able to read MSBuild properties, but it should be looking at the MSBuild property that defines the object and binary directories and excluding those....
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 04:30
I guess I can add the header and fake an autogen file, but it looks like this really needs a proper solution. If nothing else another header keyword for ignoring...
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 04:35
Btw, are null conditional operators expected to not work with the current nuget release? I'm getting parse errors.
Yaakov
@yaakov-h
Nov 04 2015 05:03
null conditional works for me... what sort of parse errors?
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 05:33
Let me try again and get back, I removed those for the time being since it was complaining.
Ali Hosseini Khayat
@ali-hk
Nov 04 2015 18:30
Looks like it's working, must have been something lying around... Btw, I love the code fixes :)
Sam Harwell
@sharwell
Nov 04 2015 20:00
@ali-hk glad to hear that!
GenZodd
@GenZodd
Nov 04 2015 20:10
Hey guys. Not sure if this is the right place but Iam using the analyzer and running into a bit of an issue. I have multiple projects running the same ruleset and same stylecop.json file. However, none of the project seem to really pick up on the configuration as they always say I need to put "PlaceholderCompany" in the copyright field instead of the name that is actually in the json file.
Vincent Weijsters
@vweijsters
Nov 04 2015 20:13
@GenZodd could you please have a look at #1720 and let me know if the workaround that is described in there works for you?
GenZodd
@GenZodd
Nov 04 2015 20:51
Thanks @vweijsters for helping me find that. That seems to have addressed the issue. I will make a comment on the post as well. Odd though. Out of the 12 projects I have I had to add that to only two for it to solve the issue for all of them.
Vincent Weijsters
@vweijsters
Nov 04 2015 20:53
Glad that worked for you. It seems that quite a few people are having these problems. We still need to find out why it happens :worried: