-
Notifications
You must be signed in to change notification settings - Fork 4
Proj0036: Remove None when redundant #99
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
Conversation
|
Title suggestion: Remove redundant Exceptions should perhaps be made for cases where the |
Partly I like the name, but it suggest way more than the rule covers (right now). We're not checking Include or Update
<ItemGroup>
<None Include="*.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Remove="LICENSE.md" />But this can also be written as: <ItemGroup>
<None Include="*.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="LICENSE.md">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>And yes, this is longer, but it is an - at least I think - uncommon scenario, that is preferable because of the simplicity of the implementation which leads to less FN's, and the unlikelyness of FP's. |
|
@Gemberkoekje Do you have a preferred title in mind? |
|
Minimize the usage of NONE ? |
|
"Remove redundant None nodes with Remove attribute"? I like Wesleys suggestion, we could expand the rule later. Another consideration, what to do when attributes are combined in one statement. For example this is possible: Is that possible for None Remove as well? Although the initial issue was raised based on 'accidental' adding and this definitely is an explicit action. So might be out of scope. |
|
Based on rule Proj0026, I went for: Remove None when redundant. |
Co-authored-by: Laura Kramer <[email protected]>
Co-authored-by: Wesley Baartman <[email protected]>
Documentation for issue 376. I'm not sure yet what title to give it. Any suggestions?