Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13411

Checkstyle suppression by annotation or comment

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None

      Description

      Suppress checkstyle audit events in a method or a section of code by annotation or comment. This can be achieved by checkstyle module SuppressWarningsFilter, SuppressionCommentFilter, and SuppressWithNearbyCommentFilter.

      Examples:

        @SuppressWarnings("checkstyle:parameternumber")
        // More than 7 parameters
        public Response putRoot(p1, p2, p3, p4, p5, p6, p7, p8)  {
          ...
        }
      
        // CHECKSTYLE:OFF:ParameterNumber
        // More than 7 parameters
        private Response put(p1, p2, p3, p4, p5, p6, p7, p8)  {
          ...
        }
        // CHECKSTYLE:ON:ParameterNumber
      
      private int [] array; // SUPPRESS CHECKSTYLE
      

        Attachments

          Activity

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              jzhuge John Zhuge
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: