Skip to content

Conversation

@drewnoakes
Copy link
Member

Fixes #257
Fixes #287
Fixes #317

New analyzers for:

  • Missing [ImportingConstructor]
  • Duplicate [ImportingConstructor]
  • Duplicate [Import]
  • Mismatched C# nullability and AllowDefault

Mostly coded using GitHub Copilot.

# Conflicts:
#	doc/analyzers/index.md
#	src/Microsoft.VisualStudio.Composition.Analyzers/AnalyzerReleases.Unshipped.md
#	src/Microsoft.VisualStudio.Composition.Analyzers/README.md
#	src/Microsoft.VisualStudio.Composition.Analyzers/Strings.Designer.cs
#	src/Microsoft.VisualStudio.Composition.Analyzers/Strings.resx
Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

This looks really good. Thanks so much.
There's a lot of code here though, so I have quite a few comments.

Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Looks much better. Do you have ideas for resolving the last two comments?

@drewnoakes
Copy link
Member Author

I believe all feedback has been addressed.

@AArnott
Copy link
Member

AArnott commented Nov 14, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Questions about InheritedExportAttribute. Ideally you can support that as well. But if you'd rather not, let's just be sure it results in too few diagnostics rather than false positives.

@AArnott
Copy link
Member

AArnott commented Nov 18, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AArnott
Copy link
Member

AArnott commented Nov 18, 2025

@drewnoakes do you have a preference to merge vs. squash?

@AArnott AArnott enabled auto-merge (squash) November 18, 2025 03:49
@AArnott
Copy link
Member

AArnott commented Nov 18, 2025

I'm gonna gamble that you want the PR completed either way. :)

Thank you very much for your contribution!

@AArnott AArnott merged commit 4e2c4f8 into microsoft:main Nov 18, 2025
6 checks passed
@drewnoakes drewnoakes deleted the analyzers branch November 18, 2025 04:25
@drewnoakes
Copy link
Member Author

Are packages created automatically? Once a version is available, I can try it in a few repos I own and give it a bit more validation.

@AArnott
Copy link
Member

AArnott commented Nov 18, 2025

Typically yes, they would show up here.
Unfortunately our official pipelines are blocked by lack of optprof data. I've just queued a special optprof run to fix that, so we'll probably get packages built tomorrow night.

@drewnoakes
Copy link
Member Author

Did the optprof run work? I'm not seeing a new analyzers package yet.

@AArnott
Copy link
Member

AArnott commented Nov 20, 2025

No. Now we're in this weird catch-22 world where the optprof run failed because of the new analyzers.
You can look at the new diagnostics here and decide whether the VS repo has issues that your analyzers are finding or if you're reporting false positives.

@drewnoakes
Copy link
Member Author

Thanks for the pointer. So far I've only seen false positives. Will get a fix together over the next day or so I hope. Let me know if this is blocking anything important and I'll try and accelerate the timeline.

@drewnoakes drewnoakes mentioned this pull request Nov 23, 2025
@drewnoakes
Copy link
Member Author

Fixed in #648

@drewnoakes
Copy link
Member Author

Was there any progress on the OptProf run unblocking a new package version? If there are still build failures, I'll take a look (though I'm not sure where to find them).

@AArnott
Copy link
Member

AArnott commented Dec 3, 2025

I'm working on the OptProf issues this week (I was OOF for the prior two weeks). They aren't build failures. They are failures in Optprof tests that I have no insight into. We're switching OptProf systems to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants