Skip to content

Some Roslyn analyzer tests have unexpected compilation errors #2588

Open
@TomFinley

Description

@TomFinley

In #2562, @sharwell updates the code analyzer tests to utilize some existing convenience classes. This is great, but it also reveals an issue with the existing tests that should be fixed.

The old mechanism that was based on the VS Roslyn templates was restrictive in the diagnostics it "listened" to and reported. But this went even so far as not even reporting actual compilation errors, and some of the test sources have compilation errors of one form or another (missing declarations mostly, it seems like, based on files from src that were included in compilation, seems to be a common theme).

For these, it was not intended that there be compilation errors in the code compiled for testing the Roslyn analyzers, so that should be addressed and fixed. (Possibly be inserting dummy declarations into the test input to get it to compile, or some other mechanism.)

See the above PR #2562, for those changes where actual compilation errors are now listed among "expected" errors. The goal of this issue would be to get it so that those new "additions" are no longer necessary.

This FYI is not API critical work for v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Doc bugs, questions, minor issues, etc.testrelated to tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions