GithubHelp home page GithubHelp logo

Should nullable reference types be supported, or have their code analysis warnings disabled inside the file via pragma's? about tinyioc HOT 4 OPEN

kmgallahan avatar kmgallahan commented on August 22, 2024
Should nullable reference types be supported, or have their code analysis warnings disabled inside the file via pragma's?

from tinyioc.

Comments (4)

niemyjski avatar niemyjski commented on August 22, 2024

I'm not sure, I think you can turn off nullable types in a file with a directive? One could always submit a pr for it :)

from tinyioc.

kmgallahan avatar kmgallahan commented on August 22, 2024

I figured out that you can specify individual files in an .editorconfig to tailor their code analysis rules.

[TinyIoc.cs]
dotnet_analyzer_diagnostic.severity = none
dotnet_diagnostic.severity = none

I'll leave this issue open to see if modifying TinyIoc.cs with pragma's to disable warnings/messages is something the author / community might be interested in (or adding support for nullability / releasing a separate package / using ifdef magic).

from tinyioc.

adydecki avatar adydecki commented on August 22, 2024

Thanks for the suggestion @kmgallahan . Does these rules in the .editorconfig should get rid of the compile warnings? It still shows "nullable" warnings after I added your rules.

from tinyioc.

kmgallahan avatar kmgallahan commented on August 22, 2024

@adydecki It works for me. Your file may be in a location that isn't being used:

Where are these files stored?

When opening a file, EditorConfig plugins look for a file named .editorconfig in the directory of the opened file and in every parent directory. A search for .editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found.

EditorConfig files are read top to bottom and the most recent rules found take precedence. Properties from matching EditorConfig sections are applied in the order they were read, so properties in closer files take precedence.

https://editorconfig.org/#file-location

from tinyioc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.