Comments (10)
Where is the benefit to use a annotation instead of a comment like
//TODO do stuff
from papercut.
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.
I cannot cause a build failure with // TODO do stuff
.
from papercut.
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.
@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.
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.
@Stuie yeah, it's just a naming thing. "Refactor" just doesn't go right for everything apparently.
from papercut.
@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.
@Stuie Yeah, that makes sense. What do you think of entirely replacing @refactor with @todo?
from papercut.
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)
- [Feature Request] Support for app version HOT 11
- Confirm AnnotationTarget values for @Debt and @Milestone
- Use addedDate and Reason from @Debt annotations
- Descriptions shouldn't be printed unless explicitly requested via options
- Display failure condition in the printed message
- Generate documentation with Dokka and publish it
- Annotating a function with @Debt is not displaying any warning in console logs HOT 4
- Update to use Kotlin 1.6 HOT 2
- Suggestion: Add option to invert the default behavior HOT 4
- [Feature Request] Support for build flavor HOT 4
- Support Java 8 HOT 8
- Support a cost attribute to calculate the technical debt HOT 1
- Find @Refactor and @RemoveThis HOT 2
- Typo in dependencies HOT 1
- Create @Debt annotation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from papercut.