{ "id": "142586", "key": "TIMOB-18355", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-01-09T18:42:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56210", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "170618", "key": "TIMOB-25605", "fields": { "summary": "Apply and enforce coding standards to all SDK code", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } }, { "id": "55182", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "168335", "key": "TIMOB-24806", "fields": { "summary": "iOS: Lint complete Xcode-project", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "56214", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "170619", "key": "TIMOB-25606", "fields": { "summary": "Android: Apply clang-format formatting to all Java sources", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T19:55:24.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "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.\r\n\r\nIn general, we seek three goals:\r\n\r\n# Where possible, we create a formatting file for existing code bases that creates the least amount of formatting changes.\r\n# If changes are necessary, it is because we wish to make those code bases similar to other existing code bases.\r\n# 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.\r\n\r\nSome cross-language tenets we adhere to:\r\n\r\n* Indentation: Tabs, with spaces for alignment. Most of our existing code uses tabs.\r\n* Opening curly brace: New line, except for blocks and flow control and lambdas\r\n* Closing curly brace: New line\r\n* Max line length: Prefer 120, but might keep at 200 for existing code bases to reduce formatting\r\n* Tab Width: 4", "attachment": [], "flagged": false, "summary": "Create formatting files for C++, Objective-C, Java, and JavaScript", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "338576", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For C++ and Objective-C I have been experimenting with Clang-Format.\r\n\r\nFirst, I think it would be helpful to create a test file for Objective-C that demonstrates the cases shown in https://wiki.appcelerator.org/pages/viewpage.action?pageId=30088343\r\n\r\n# C++. Our coding standards are based on Google's, with the following modifications (using clang-format as an example):\r\n## BasedOnStyle: Google\r\n## UseTab: ForIndentation\r\n## IndentWidth: 4\r\n## TabWidth: 4\r\n## BreakBeforeBraces: Linux\r\n## ColumnLimit: 120\r\n## AllowShortIfStatementsOnASingleLine: false\r\n## AllowShortLoopsOnASingleLine: false\r\n## AlwaysBreakBeforeMultilineStrings: false\r\n## Standard: Cpp11\r\n# Objective-C. We also base these on the clang-format Google standard, since those seem most similar to our current code base, also using the above modifications. One challenge is that our stand explicitly says no space between the '\\+' and '(' here: {{+(TiOrientationFlags) TiOrientationFlagsFromObject:(id)args}}. I seem to be unable to find a clang-format option to control this.\r\n# Java: We should see if we can use the same formatting file for Studio and Android\r\n# JavaScript: \r\n\r\nNext, find tooling and create formatting files as appropriate\r\n# C++. Create a Visual Studio formatting file and clang-format file and make them agree\r\n# Objective-C. Create a clang-format file that we can use in Xcode\r\n# Java: Create a Eclipse and Android Studio formatting file and make them agree\r\n# JavaScript. Create Appcelerator Studio and Atom formatting files. The Appcelerator Studio defaults should be tweaked to match this.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-09T20:35:57.000+0000", "updated": "2015-03-02T07:00:55.000+0000" }, { "id": "344746", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vduggal] [~msamah] [~cng] [~jalter] please review: https://github.com/appcelerator/titanium_mobile/pull/6675", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-02T05:29:46.000+0000", "updated": "2015-03-02T05:29:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }