Skip to content
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

Perform refactoring of AnnotationLocationCheck to increase code readability #4055

Closed
MEZk opened this issue Mar 19, 2017 · 1 comment
Closed

Comments

@MEZk
Copy link
Contributor

MEZk commented Mar 19, 2017

Points to improve:

  1. Many methods of AnnotationLocationCheck class have copy-pasted javadoc.
    For example,
    private static boolean hasAnnotations(DetailAST modifierNode) {
    ,
    private static int getAnnotationLevel(DetailAST modifierNode) {
    , and others.
  2. Method names are not clear enough to understand their purposes without diving inside. For example,
    what does getAnnotationLevel mean? Does the annotation have the level? Does the level refer to a language structure?
  3. Some variables and method parameters have unclear names too. For example, what does the parameter name correctLevel mean? Javadoc also says nothing.

Points 1-3 need to be improved.

MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 19, 2017
MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 19, 2017
MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 19, 2017
MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 20, 2017
MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 21, 2017
MEZk added a commit to MEZk/checkstyle that referenced this issue Mar 21, 2017
romani pushed a commit that referenced this issue Mar 22, 2017
@romani romani added this to the 7.7 milestone Mar 22, 2017
@romani
Copy link
Member

romani commented Mar 22, 2017

fix is merged.

@romani romani closed this as completed Mar 22, 2017
SergeyDzyuba pushed a commit to SergeyDzyuba/checkstyle that referenced this issue Mar 22, 2017
GitToasterhub pushed a commit to GitToasterhub/checkstyle that referenced this issue Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants