[C#] Cannot analyse projects with implicit usings

Description

C#10 introduce support for implicit using statements. Projects using this feature are not analysed correctly.

 

Related community thread: https://community.sonarsource.com/t/rider-not-showing-codesmells/55252/10

 

Updating to a newer version of OmniSharp might fix this bug (see https://sonarsource.atlassian.net/browse/SLI-616#icft=SLI-616).

 

TODO: check whether `global` usings are also supported.

Repro steps

  1. Create a new C# project and enable implicit usings in the project file

  2. Add a code file that use implicit usings

  3. Analyse the file

Expected result

The file is analysed successfully and issues are reported.

Actual result

No issues are reported.

 

is related to

Activity

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Sentry

Created December 22, 2021 at 11:04 AM
Updated September 16, 2024 at 1:15 PM
Resolved July 8, 2022 at 2:54 PM