Coder Social home page Coder Social logo

[Feature Request] TODOs about papercut HOT 10 CLOSED

stuie avatar stuie commented on June 28, 2024
[Feature Request] TODOs

from papercut.

Comments (10)

StefMa avatar StefMa commented on June 28, 2024 2

Where is the benefit to use a annotation instead of a comment like

//TODO do stuff

from papercut.

Stuie avatar Stuie commented on June 28, 2024 1

Given that you're happy with your solution, and the feature request is essentially to duplicate/rename an annotation with no new behavior I'm just going to close it for now.

I'll keep a rename in mind, and especially if I get another feature request along the same lines.

from papercut.

vibin avatar vibin commented on June 28, 2024

I cannot cause a build failure with // TODO do stuff.

from papercut.

Stuie avatar Stuie commented on June 28, 2024

With the annotation you could choose to fail for certain instances, and not for others.

Perhaps you want to fail for placeholder strings but not for adding javadoc, etc.

Tools like Checkstyle don't have that level of granularity.

from papercut.

Stuie avatar Stuie commented on June 28, 2024

@vibinr Can you think of any specific new behavior that you would need for a @Todo that you couldn't just do with @Refactor? Is it simply a naming issue for you?

I don't want to end up with many annotations with duplicated behavior if I can avoid it. :)

from papercut.

vibin avatar vibin commented on June 28, 2024

I want the build to fail each time I do @todo with stopShip = true. So, same as @refactor, including targeted element types, just the name is different.

Don't think I understand Checkstyle's relevance here...

from papercut.

vibin avatar vibin commented on June 28, 2024

@Stuie yeah, it's just a naming thing. "Refactor" just doesn't go right for everything apparently.

from papercut.

Stuie avatar Stuie commented on June 28, 2024

@vibinr I was responding more to @StefMa's question

Where is the benefit to use a annotation instead of a comment

You can set up Checkstyle to fail a build when it finds a // TODO or // FIXME comment, but you don't have the same level granularity of control with that, as you may want some of them to fail the build, but not all of them. This is especially the case if you're in a large existing codebase with comments like that in multiple places. An annotation is much more fine-grained.

If you're starting with a brand new codebase then arguably Checkstyle makes more sense.

There was a thread about this on Reddit if you're interested in reading more.

from papercut.

vibin avatar vibin commented on June 28, 2024

@Stuie Yeah, that makes sense. What do you think of entirely replacing @refactor with @todo?

from papercut.

vibin avatar vibin commented on June 28, 2024

Got this functionality working with Android lint's StopShip instead 😀
http://stackoverflow.com/questions/33504186/how-to-make-grade-release-build-fail-using-lint-option-stopship

from papercut.

Related Issues (16)

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.