Platform-releng/Formatting And Naming Conventions

From Eclipsepedia

Jump to: navigation, search

These guidelines apply primarily to the "eclipse.platform.releng.aggregator" repository, but also for any new work done in "eclipse.platform" and "eclipse.platform.releng"



These conventions apply to all types of files: Bash scripts, Ant Scripts, Maven/Tycho files, Property files, etc.

  • Use spaces, instead of tab characters
  • Use 2 spaces for indentation, for all types of text files.
  • Ordinarily, leave "line breaks" as they are (that is, as each author originally had them) unless substantial reason to change.
  • Make formatting changes separate from content changes (that is, patches and commits should have only "content changes" when fixing bugs, etc., but can be preceded or followed by a commit that makes formatting changes).

Naming Contentions

[This section subject to change, as reviewed by others and as we learn more].

Shell (Bash) scripts

Unless impossible, variables should be written in such as way as to be usable in shell scripts, ant files, and PHP files. For example, since BASH scripts can not have a variable that starts with a numeral, no variables should start with a numeral (even though allowed in Ant). The reasoning is that even if original intent is to use as an Ant property, there might be occasion to also use as a Shell or PHP property in the future.

  • Variables that are export or used as parameters to functions should be all upper case, with "words" separated by underscore character.