Skip to content

Reuse linker tests in analyzer #2299

Closed
Closed
@sbomer

Description

@sbomer

This is a tracking issue that I'll try to keep updated to reflect the work left to get to 100% coverage of the linker's warning validation in the analyzer.

We already have some shared tests, and #2292 improves the validation (especially for UnrecognizedReflectionAccessPattern), but there are still some discrepancies that prevent sharing of tests. The one I'm aware of is:

  • [ ] Ensure analyzer and linker use same signature format
    • This is required for a lot of the UnrecognizedReflectionAccessPattern attributes
    • No namespaces in parameter types
    • No namespace or declaring type in callee method
    • Use spaces between parameters

Once that's fixed we should start turning on various tests and fixing any remaining discrepancies as we uncover them:

Other test sharing that we can start doing, which doesn't depend on the UnrecognizedReflectionAccessPattern as far as I know:

  • Share RequiresCapability tests
    • RequiresAssemblyFiles analyzer should be able to reuse testcases for RequiresUnreferencedCode.
    • @tlakollo already renamed the test to be agnostic to the attribute name: Rename RequiresUnreferencedCode to Requires  #2301
    • Need to add RequiresAssemblyFiles attribute and ExpectedWarnings produced by RequiresAssemblyFiles analyzer only

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions