Skip to content
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

Warning/errors being shown twice #1965

Closed
vieirandre opened this issue Jan 20, 2018 · 3 comments
Closed

Warning/errors being shown twice #1965

vieirandre opened this issue Jan 20, 2018 · 3 comments

Comments

@vieirandre
Copy link

vieirandre commented Jan 20, 2018

Environment data

dotnet --info output:

Product Information:
Version:            2.1.4
Commit SHA-1 hash:  5e8add2190

Runtime Environment:
OS Name:     Windows
OS Version:  10.0.16299
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

Version  : 2.0.5
Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54

VS Code version:

1.19.2 (x64)

C# Extension version:

1.13.1

Steps to reproduce

  1. Create a Console Application project with dotnet new console
  2. Declare [and optionally assign] a value to any variable. For instance, int x = 1;
  3. Do not use it anywhere in the code.
  4. Hover the mouse over it.

Obs.: sometimes you need to hover twice to get the fault behavior, or let the pointer over the variable for a bit.

Expected behavior

A warning stating:

The variable 'x' is assigned but its value is never used [namespace]
int x

Actual behavior

The warning appears twice:

The variable 'x' is assigned but its value is never used [namespace]
The variable 'x' is assigned but its value is never used [namespace]
int x

@vieirandre vieirandre changed the title Warning about variable never used is being shown twice Warning/errors being shown twice Jan 20, 2018
@vieirandre
Copy link
Author

I changed the title because I noticed that this duplication behavior happens with any warnings/errors.

@imba-tjd
Copy link
Contributor

@DustinCampbell Fine. I think this is a duplicate of #1830

@DustinCampbell
Copy link
Member

Thanks @imba-tjd. Agreed!

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

No branches or pull requests

3 participants