Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Add ability to ignore particular build warnings #2042

Closed
smudge202 opened this issue Jun 10, 2015 · 10 comments
Closed

Add ability to ignore particular build warnings #2042

smudge202 opened this issue Jun 10, 2015 · 10 comments

Comments

@smudge202
Copy link

There is currently no way to suppress specified compiler warnings akin the Build tab of old project properties.

http://puu.sh/hCNDe/6314b5a5ef.png

Issue first raised here: dotnet/aspnetcore#564

@muratg
Copy link
Contributor

muratg commented Jun 10, 2015

This is a good idea. Let's try it in beta 6.

@muratg muratg modified the milestones: Backlog, 1.0.0-beta6 Jun 23, 2015
@Eilon Eilon changed the title Suppress compiler warnings Add ability to ignore particular build warnings Sep 13, 2015
@Eilon Eilon removed this from the Backlog milestone Sep 13, 2015
@Eilon
Copy link
Member

Eilon commented Sep 13, 2015

Moving this out of backlog so we can reconsider.

@bricelam
Copy link
Contributor

bricelam commented Oct 9, 2015

I prototyped something in bricelam:nowarn, but it's probably not the design you're looking for...

Format would be

{    
  "compilationOptions": {
    "noWarn": ["CS618", "CS1591"]
  }
}

@muratg
Copy link
Contributor

muratg commented Oct 9, 2015

I actually like @bricelam's design and implementation. cc: @davidfowl

If we decide to go with it, I'd like Brice to add some tests :)

@davidfowl
Copy link
Member

Is it just suppressions? Do we want to expose this enum:

ReportDiagnostic.XX

@smudge202
Copy link
Author

Just suppressions as @bricelam implemented looks ideal. Can always improve the model with fanciness later. Suppression is much closer to need.

@Eilon
Copy link
Member

Eilon commented Oct 9, 2015

I think just suppressions like /nowarn:X would be awesome for v1.

Could we just take @bricelam 's code as a PR?

BTW after doing this also need to send a PR to SchemaStore to add the new option to the project.json schema: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/project.json

@bricelam
Copy link
Contributor

I'll add some tests and send an official PR.

@davidfowl
Copy link
Member

@bricelam Lets do it

@bricelam bricelam self-assigned this Oct 19, 2015
@muratg muratg modified the milestones: 1.0.0 backlog, Backlog Dec 11, 2015
@muratg
Copy link
Contributor

muratg commented Dec 18, 2015

This issue was moved to dotnet/cli#576

@muratg muratg closed this as completed Dec 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants