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

Support for IgnoredCodeIssues in config #301

Closed
FabioCZ opened this issue Sep 17, 2015 · 8 comments
Closed

Support for IgnoredCodeIssues in config #301

FabioCZ opened this issue Sep 17, 2015 · 8 comments

Comments

@FabioCZ
Copy link

FabioCZ commented Sep 17, 2015

Hey everyone,
I am trying to use a omnisharp.json config file with my project in VS Code (v0.8.0 atm). I'd like to be able to use IgnoredCodeIssues in my config.

My omnisharp.json looks like this:

{    
"IgnoredCodeIssues": [
    "*Assuming assembly reference*"
    ],
}

However, Omnisharp fails to start and throws the following:

System.FormatException: Unsupported JSON token 'StartArray' was found. Path 'IgnoredCodeIssues', line 1 position 27.
  at Microsoft.Framework.ConfigurationModel.JsonConfigurationSource.Load (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.ConfigurationModel.JsonConfigurationSource.Load () [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.ConfigurationModel.Configuration.Add (IConfigurationSource configurationSource) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.ConfigurationModel.JsonConfigurationExtension.AddJsonFile (IConfigurationSourceRoot configuration, System.String path, Boolean optional) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.ConfigurationModel.JsonConfigurationExtension.AddJsonFile (IConfigurationSourceRoot configuration, System.String path) [0x00000] in <filename unknown>:0 
  at OmniSharp.Startup..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 

It'd be cool if this config option was supported

thanks

@david-driscoll
Copy link
Member

I think this is probably related to the fact that we're tied to to beta4
arm, and IConfiguration has had that feature added somewhat recently, this
is something that I think we can support in the future.
On Thu, Sep 17, 2015 at 12:04 PM Fabio Göttlicher notifications@github.com
wrote:

Hey everyone,
I am trying to use a omnisharp.json config file with my project in VS Code
(v0.8.0 atm). I'd like to be able to use IgnoredCodeIssues in my config.

My omnisharp.json looks like this:

{ "IgnoredCodeIssues": [
"Assuming assembly reference"
],
}

However, Omnisharp fails to start and throws the following:

System.FormatException: Unsupported JSON token 'StartArray' was found. Path 'IgnoredCodeIssues', line 1 position 27.
at Microsoft.Framework.ConfigurationModel.JsonConfigurationSource.Load (System.IO.Stream stream) [0x00000] in :0
at Microsoft.Framework.ConfigurationModel.JsonConfigurationSource.Load () [0x00000] in :0
at Microsoft.Framework.ConfigurationModel.Configuration.Add (IConfigurationSource configurationSource) [0x00000] in :0
at Microsoft.Framework.ConfigurationModel.JsonConfigurationExtension.AddJsonFile (IConfigurationSourceRoot configuration, System.String path, Boolean optional) [0x00000] in :0
at Microsoft.Framework.ConfigurationModel.JsonConfigurationExtension.AddJsonFile (IConfigurationSourceRoot configuration, System.String path) [0x00000] in :0
at OmniSharp.Startup..ctor () [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in :0

It'd be cool if this config option was supported

thanks


Reply to this email directly or view it on GitHub
#301.

Thanks,
David

@nosami
Copy link
Contributor

nosami commented Sep 17, 2015

This particular issue is probably fixed in the latest omnisharp-roslyn too. Not the configuration aspect, but the way that assemblies are compared.

@nosami
Copy link
Contributor

nosami commented Sep 17, 2015

@FabioCZ Can you try omnisharp-atom out and see if the problem is there too? The latest omnisharp-roslyn fix is in atom as of yesterday

@FabioCZ
Copy link
Author

FabioCZ commented Sep 17, 2015

Tried latest omnisharp with Atom, and the "Assuming assembly reference..." problem seems to be gone. Thanks

@aggieben
Copy link

Is there anything since 2015 that would address this and related issues? In my case, OmniSharp is still a little behind with respect to the new RC4 tooling, so I see issues listed in the Problems tab; they are intellisense issues in csproj files relating to missing syntax that would be expected in MSBuild 12.0, but not in the lastest build tools.

@DustinCampbell
Copy link
Contributor

The latest version of omnisharp-roslyn is up-to-date with VS 2017 RC4 tooling. It even includes a build of MSBuild 15.0 inside of it.

@Leandros
Copy link

Leandros commented Mar 6, 2018

Still not possible? The rule 'Fields' spits out a ton of warnings, since omnisharp doesn't seem to like my variable names.

@filipw
Copy link
Member

filipw commented Jun 20, 2019

I will close this as no longer valid - we don't support IgnoredCodeIssues anymore.
Instead you can control these behaviors using rulesets and - soon - using .editorconfig (#1526)

@filipw filipw closed this as completed Jun 20, 2019
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

7 participants