Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCS1093 Bad behavior on non-empty #if <def> files #53

Closed
NickCraver opened this issue Feb 26, 2017 · 2 comments
Closed

RCS1093 Bad behavior on non-empty #if <def> files #53

NickCraver opened this issue Feb 26, 2017 · 2 comments
Assignees
Labels

Comments

@NickCraver
Copy link
Member

I'm not sure what to suggest here, just providing that the suggestion is odd. Analyzer in play:

RCS1093: Remove file with no code.

But when compiling projects where the whole file is #if conditioned, this is an invalid suggestion overall. Example:

#if NET46
namespace MyTests
{
    public class Test { }
}
#endif

...when the project targets both netstandard1.5 and net46. Screenshot of my example case:
screen shot 2017-02-26 at 10 07 15

So while in the context of that particular framework compilation there isn't any used code, there is code in the file (where the suggestion points). Is it possible to change this check for actual empty files, or is there no knowledge of that available?

@josefpihrt josefpihrt added the Bug label Feb 26, 2017
@josefpihrt josefpihrt self-assigned this Feb 26, 2017
@NickCraver
Copy link
Member Author

Thanks!

josefpihrt added a commit that referenced this issue Feb 27, 2017
@josefpihrt
Copy link
Collaborator

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants