Skip to end of metadata
Go to start of metadata

ONAP uses Google Java Style with some modifications:

  • 4.2 Block indentation: +4 spaces

  • 4.4 Column limit: 120

IDE code formatter configurations can be found in the Google Style Guide repo.


  1. Here are the other references:

  2. For that matter, all of Google's language style guidelines can be found under

  3. This practice is recommended but not mandatory for Amsterdam release.

    Practice approved by TSC 2017-07-13 (topic #10). PDF Summary of materials presented.

  4. Since ONAP is recommending a modified Google style, it would be very useful if ONAP would publish the configuration files for popular IDEs like Eclipse, IntelliJ to implement that style.

    1. The hyperlinks above can be used to find such configuration files. For example, here are the settings for (an unknown version of) Eclipse: A developer could start with these settings and manually apply the modifications. I would be happy to share my current settings with you.

      I think it is a lot simpler to refer to the Google-maintained archive of the style guide and describe how ONAP deviates from this. If configuration files are published here then they will need to be maintained/synchronized. This process would be further complicated if multiple versions of multiple IDEs are supported.

  5. I'd like to suggest that the column limit, for comments, be 90, as 120 is hard on the eyes, requiring much more visual scrolling back and forth.

  6. When I build a project with Maven I get warnings when exceeding the column limit. But there are no Sonar warnings for this. The same goes for ordering of imports, I get warnings when using Maven but don't see anything in Sonar. Shouldn't Sonar also check these things?