Giter Site home page Giter Site logo

Comments (5)

citizenmatt avatar citizenmatt commented on July 21, 2024

Ah, this is the intersection between ReSharper features and StyleCop features. The inspection is SA1200, and a StyleCop feature, but moving the using statements is a ReSharper feature. The settings file that gets added (ReSharper → Manage Options → StyleCop) sets the C# Code Style "Add 'using' directive to deepest scope", which is the ReSharper cleanup for SA1200. If you uncheck this, it won't reorder your using statements any more.

from stylecop.

wiredwiz avatar wiredwiz commented on July 21, 2024

I don't quite understand. If I go to ReSharper → Manage Options, there is no StyleCop option anywhere on this screen. It just lists the different settings levels. The only StyleCop sections I see are under Options and Tools, or the new Code Cleanup Profile, neither of which has the "Add 'using' directive to deepest scope" you are referring to.

from stylecop.

wiredwiz avatar wiredwiz commented on July 21, 2024

I found it under ReSharper → Options → Code Editing → C# → Code Style. Thank google :)

from stylecop.

citizenmatt avatar citizenmatt commented on July 21, 2024

Yep, sorry, that's where it is. You should have an "StyleCop.StyleCop » StyleCop" item (I could perhaps name that better 😄) under Extensions in ReSharper → Manage Options. If you don't, can you check you've installed "StyleCop by JetBrains". If you've got "ReSharper.StyleCop", you should uninstall it - it's buggy.

from stylecop.

wiredwiz avatar wiredwiz commented on July 21, 2024

I do have that listed under manage options but I saw no way to get to the rule you were talking about from there. I really wish there was a unified interface for editing and maintaining the rules, instead of some in resharper settings and some in the stylecop settings file. That is one thing I very much preferred in ReSharper.StyleCop.

from stylecop.

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.