Uploaded image for project: 'REEF (Retired)'
  1. REEF (Retired)
  2. REEF-332 Pass checkstyle
  3. REEF-360

Fix violations / reconfigure checkstyle checks in "Blocks" category

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.12
    • All
    • None

    Description

      1. LeftCurly ({ must be on the end of line) and NeedBraces ({} around code blocks): fix
      2. AvoidNestedBlocks (prohibit "blocks used freely in code"): we have several violations, but some of them seem legit because they introduce local variables:
        • org/apache/reef/util/MemoryUtils.java, line 101
        • org/apache/reef/examples/suspend/SuspendDriver.java, line 280
        • org/apache/reef/webserver/HttpServerReefEventHandler.java, line 122
          The check can be configured to ignore blocks in case in a switch statement, but not the first one.
      3. *EmptyBlock (prohibit blocks without any statements): we have multiple violations, majority of them due to empty catch clauses. The check can be reconfigured to allow blocks with comments only, or to enforce the check for only an explicit subset of block types (excluding catch blocks); it feels weird to add some kind of empty statement just for the sake of it being present.

      Attachments

        Activity

          People

            MariiaMykhailova Mariia Mykhailova
            MariiaMykhailova Mariia Mykhailova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: