-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Analyzers acquisition experience #9977
Analyzers acquisition experience #9977
Conversation
3b41327
to
53a7c8b
Compare
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.
Will need to do deeper pass for approve/request changes result - but overall looks good.
It feels this deserves a section in documentation
src/Build/BuildCheck/Acquisition/BuildCheckAcquisitionModule.cs
Outdated
Show resolved
Hide resolved
src/Build/BuildCheck/Acquisition/BuildCheckAcquisitionModule.cs
Outdated
Show resolved
Hide resolved
src/Build/BuildCheck/Infrastructure/BuildCheckConnectorLogger.cs
Outdated
Show resolved
Hide resolved
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!
I added couple comments - the double iteration in acquisition module is reason for requesting changes, but otherwise it looks good!
Context
This PR implements acquisition flow for custom analyzers.
The process can be described the next way:
A Custom Analyzer library contains a file
Company.AnalyzerTemplate.props
.If this analyzer is referenced from any solution, MSBuild invokes intrinsic function
RegisterAnalyzer
during the evaluation. It emitsBuildCheckAcquisitionEventArgs
if the parsed path to custom analyzer is valid.This event is handled by
BuildCheckConnectorLogger
: it passes the info toIBuildCheckManager.ProcessAnalyzerAcquisition
.Tests
Manual and unit tests.
I plan to cover e2e scenarios once MSBuild.Build package with BuildCheck infrastructure is available for public reference (it is needed for custom templates).