-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format viewpoint test annotations #940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this!
build.gradle
Outdated
@@ -300,7 +300,7 @@ allprojects { | |||
|
|||
googleJavaFormat().aosp() | |||
importOrder('com', 'jdk', 'lib', 'lombok', 'org', 'java', 'javax') | |||
formatAnnotations().addTypeAnnotation("PolyInitialized") | |||
formatAnnotations().addTypeAnnotation("PolyInitialized").addTypeAnnotation("A").addTypeAnnotation("B").addTypeAnnotation("Bottom").addTypeAnnotation("PolyVP").addTypeAnnotation("ReceiverDependentQual").addTypeAnnotation("Top") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you turn this into two arrays: 1) regular type qualifiers that are not in spotless (yet) 2) test type qualifiers that never make sense to add to spotless.
For the second set, can you add a comment/script, that re-creates the array for future additions?
Then, turn the addTypeAnnotation
into a functional style that passes each array element.
Looks like spotless does not allow
However, I also notice spotless already support a few of our testannotations so I can simplify it. Also it is good to notice that they format the array in alphabetical order, I am wondering do they use automatical tool to do it or just do it manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fix #873