Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18355

Create formatting files for C++, Objective-C, Java, and JavaScript

    Details

    • Type: Improvement
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TiAPI
    • Labels:
      None

      Description

      We have a number of different formats in use across our various languages. I would like to come up with one format for each language and a set of tools that can implement/enforce that format.

      In general, we seek three goals:

      1. Where possible, we create a formatting file for existing code bases that creates the least amount of formatting changes.
      2. If changes are necessary, it is because we wish to make those code bases similar to other existing code bases.
      3. When choosing tooling, we prefer configuring built-in tooling (i.e. adding a formatting file to Eclipse) vs using an external third-party formatter. This is to reduce the amount of effort needed for contributors to adhere to this format.

      Some cross-language tenets we adhere to:

      • Indentation: Tabs, with spaces for alignment. Most of our existing code uses tabs.
      • Opening curly brace: New line, except for blocks and flow control and lambdas
      • Closing curly brace: New line
      • Max line length: Prefer 120, but might keep at 200 for existing code bases to reduce formatting
      • Tab Width: 4

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ingo Ingo Muschenetz
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration