Giter Site home page Giter Site logo

Comments (5)

DoCode avatar DoCode commented on July 2, 2024

+1

from stylecop.

citizenmatt avatar citizenmatt commented on July 2, 2024

Not as it stands. The issue is that the code cleanup dialog isn't really intended to have all of the switches for all of the rules - there are over 150 rules, and while there aren't as many fixes in code cleanup, it still gets unwieldy to set them there.

My thinking in getting rid of these options in the dialog is why run code cleanup and not automatically fix everything we can? Does it make sense to clean up the code and still leave it failing?

What's your reasoning/use case here? Is it that the automatically created docs are not useful enough and you'd prefer to fix them yourself, or is something more generic?

For example, if the ReSharper plugin had an option just for docs (Add Default Comments, Add TODO Placeholders, Do Not Touch) would that solve the problem? Or is it something that needs to be applied to more rules (in which case some other UI needs to be thought about)?

from stylecop.

daviddunson avatar daviddunson commented on July 2, 2024

The purpose for documentation is for another developer to understand what the type member does. Automatic documentation defeats this purpose. Adding default documentation for parameter-less constructors is OK; however, everything else must be addressed by the developer. Adding TODO might seem like an acceptable solution; but unless the developer goes looking for these entries, the work will never get done. I need SA1600 warnings to show up during the build to force the developers to address documentation before checking in their code.

from stylecop.

dmitriyse avatar dmitriyse commented on July 2, 2024

+5! This is must have feature (take it back into cleanup dialog). Some StyleCop cleanups works awfull and should be disabled, but corresponding rules should be enforced at build (command line check). I cannot migrate to R# 9.2 until this feature will be "re-implemented". P.S Thank you for giving new live to the StyleCop.

from stylecop.

citizenmatt avatar citizenmatt commented on July 2, 2024

I've separated out the code cleanup options into two - "Fix violations" and "create XML doc stubs". I still think the idea that if code cleanup can fix violations (spacing, ordering, missing this, missing brackets, etc.) then it should. There shouldn't really be any need for configuration - as long as the rule is enabled, the code should be reformatted to match.

But, I do think the argument for not creating XML doc stubs is a good one. Ordering and layout is one thing, but generating content is a bit much. So, XML doc stub creation is a separate option, disabled by default. (To be honest, I'm not a fan of the XML comment rules, especially when it comes to the default text it should start with - the text for the constructor summary is always the same, it doesn't tell us anything useful, why clutter up your code with it?)

Anyway, that's what I've done for now. Let me know what you think.

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.