ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doroszlai, Attila (JIRA)" <>
Subject [jira] [Commented] (AMBARI-19149) Clean up Ambari Server source code warnings
Date Mon, 12 Dec 2016 10:49:58 GMT


Doroszlai, Attila commented on AMBARI-19149:

Checkstyle execution can be bound to any lifecycle phase.  Executing before compilation can
lead to false warnings if the code does not compile, though.  Note that the RAT check, which
can be thought of as a very specialized style check, is also bound to the {{test}} phase.
 Both will make the build fail on violations.  So while nobody is forced to run any checks
before commit, it won't get to the builds.  BTW, no one is forced to compile code before commit,

> Clean up Ambari Server source code warnings
> -------------------------------------------
>                 Key: AMBARI-19149
>                 URL:
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>            Reporter: Doroszlai, Attila
>            Assignee: Doroszlai, Attila
>             Fix For: 3.0.0
>         Attachments: AMBARI-19149-1.patch, IDEA_Ambari_v1.xml
> Eclipse's default warnings generated for {{ambari-server}} number roughly over 3300.
Out of these, at least half of them are:
> * Unused imports
> * Type safety due to forgotten {{<>}}
> * Missing Serialization IDs from anonymous {{HashMap}} implementations
> * Unused variables
> * {{Capture<T>}} in tests
> * {{switch}} fall-through and missing {{case statements}}: *only makes changes which
won't affect existing functionality*
> This makes spotting actual problems, like missing {{case}} statements a nightmare. We
need to go through and clean out as many of these warnings as possible. 
> Note: With respect to the import cleanup, the IDE of choice should have the following
import order setup. They should always be expanded and never use {{*}}.
> # {{java}}
> # {{javax}}
> # {{org}}
> # {{com}}
> # other

This message was sent by Atlassian JIRA

View raw message