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

Port single-file analyzer #1665

Merged
merged 10 commits into from
Dec 9, 2020
Merged

Port single-file analyzer #1665

merged 10 commits into from
Dec 9, 2020

Conversation

mateoatr
Copy link
Contributor

@mateoatr mateoatr commented Dec 3, 2020

No description provided.

{
public static class MSBuildPropertyOptionNames
{
public const string PublishSingleFile = nameof (PublishSingleFile);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to add PublishTrimmed now since otherwise all the trim warnings will automatically be turned on during single-file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to think about the more general area than to hardcode the single narrow scenario? Are we going to add a property for each of remaining scenario which would benefit from the same logic?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps there's some broader feature work we could do, but we certainly need to recognize whether trimming or single-file are enabled, so we at least need to recognize the two MSBuild properties that already exist.

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, aside from missing test

@mateoatr mateoatr merged commit a86658f into dotnet:master Dec 9, 2020
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
* Add single-file analyzer

* Add tests

* Use str constant

* Update Resources

* Update tests

* PR feedback

* Remove mysterious filename from comments

* Add helper method for single-file diagnostic verification

* Refactor MSBuild properties

* Add test with PublishSingleFile not set

Commit migrated from dotnet/linker@a86658f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants