Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1915

Integrate checkstyle for java code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.0.0
    • None
    • None

    Description

      There are a lot of little style and layering problems that tend to creep into our code, especially with external patches and lax reviewers.

      These are the usual style suspects--capitalization, spacing, bracket placement, etc.

      My personal pet peave is a lack of clear thinking about layers. These layering problems crept in quite fast, and sad to say a number of them were accidentally caused by me. This is things like o.a.k.common depending on o.a.k.clients or the consumer depending on the producer.

      I have a patch that integrates checkstyle to catch these issues at build time, and which corrects the known problems. There are a fair number of very small changes in this patch, all trivial.

      Checkstyle can be slightly annoying, not least of which because it has a couple minor bugs around anonymous inner class formatting, but I find it is 98% real style issues so mostly worth it.

      Attachments

        1. KAFKA-1915_2015-02-03_09:17:34.patch
          425 kB
          Jay Kreps
        2. KAFKA-1915.patch
          423 kB
          Jay Kreps

        Activity

          People

            jkreps Jay Kreps
            jkreps Jay Kreps
            Joel Jacob Koshy Joel Jacob Koshy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: