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

Comments

Projects
None yet
2 participants
@MEZk
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.

@romani romani added the approved label 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 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 added a commit that referenced this issue Mar 22, 2017

@romani romani added this to the 7.7 milestone Mar 22, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Mar 22, 2017

Member

fix is merged.

Member

romani commented Mar 22, 2017

fix is merged.

@romani romani closed this Mar 22, 2017

SergeyDzyuba added a commit to SergeyDzyuba/checkstyle that referenced this issue Mar 22, 2017

GitToasterhub added 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