Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
AnnotationLocation: Remove unused tokens #6416
Acceptable tokens for
This code will compile, but no one will use this style.
Full list of removed tokens:
added a commit
Feb 10, 2019
referenced this issue
Feb 10, 2019
The java grammar says annotations can appear right after the throws token.
Are you still saying there is no way for the check to validate them? Is this just a bug that we need fix suppport for them?
If the code can compile and the check can create violations on them, then I think they should stay. It is not up to use to say who's style will be used or not. Check creator went through our process to create the check which isn't always easy.
Annotations are in use over code more and more, especially to do hints to some tools or even use codegeneration. But it is up to us to decide what Check should cover it. It is clear that it not always reasonable to have a check that can do all token support, some cases we can skip also.
I would say, it is line wrap cases, some another Check should cover such cases if somebody care.
@pbludov , please define strict list of tokens you think should be removed, to make it clear why we remove each token.
No because there are too many repositories and too many private projects and such. It still doesn't mean someone would not use it. There are also other options in check to allow some singleline annotations in that scenario.
The history of these tokens goes back to #604 (comment) point number 3. They were added without any tests, so that may be why they may or may not work correctly.
I am ok to remove such Tokens, I extended comment at #6416 (comment) with details on a reason.
All that tokens are not related to original idea of Check
I am ok to remove proposed list of tokens and cause breaking compatibility.
@rnveach , please review this issue one more time and approve it.