-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
AvoidCopyAlways Check #11054
AvoidCopyAlways Check #11054
Conversation
8ade309
to
83099b9
Compare
Co-authored-by: Rainer Sigwald <[email protected]>
…build into proto/copyalways-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
* `PreserveNewest` | ||
* `IfDifferent` | ||
|
||
`Always` is not recommended, as it causes the files to be copied in every build, even when the destination file content is identical to the source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that it is not recommended; should it be listed last?
public override IReadOnlyList<CheckRule> SupportedRules { get; } = [SupportedRule]; | ||
|
||
public override void Initialize(ConfigurationContext configurationContext) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bodyless inherited method; by design?
Fixes #7654
Context
Adding a check validating that
Always
is not being used forCopyToOutputDirectory
metadata. Or that theSkipUnchangedFilesOnCopyAlways
property is set toTrue
to avoid unnecessary copying.Testing
Tailored tests added - covering as well the #11052