• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. OpenJFX
  4. Code Style Rules

Page History

Versions Compared

Old Version 2

changes.mady.by.user Richard Bair

Saved on Jun 29, 2013

compared with

New Version 3

changes.mady.by.user Steve Northover

Saved on Nov 06, 2013

  • Previous Change: Difference between versions 1 and 2
  • Next Change: Difference between versions 3 and 4
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Code Style Rules

OpenJFX has strict code style guidelines that should be enforced on every changeset. All developers will differ in opinion on every coding convention (tabs or spaces?). However on a large project with many individuals, if it were left to each developer to specify their own conventions, then we would quickly end up with a complete mess for our source code. This extends far beyond spaces vs. tabs (which, by the way, we use spaces) but also includes API design and is one reason why all API must be reviewed before it is integrated. Consistency is vitally important in making an API easy to learn and use.

...

Not everybody will like all of the code style rules, but hopefully most people will like most of them. More important, by following these rules we will have a consistent codebase with all the aforementioned benefits. This is a "living document" and will be amended as we go along. When new issues arise, we will add them to this list.

Whitespace

  1. No trailing whitespace. Most (all?) IDEs can be configured to automatically trim trailing whitespace
  2. Use Spaces not Tabs.
  3. Use 4 space indentation
  4. Keep the single empty line at the end of every file
  5. Insert a space between the Copyright notice and the package statement
  6. Insert a space between the package statement and any import statements
  7. There should be one space between the last import statement and the class documentation
  8. ...

Code Review Process

 

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 851, "requestCorrelationId": "3341768373a0bdda"}