{ "id": "144307", "key": "TIMOB-18521", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-02-06T14:17:10.000+0000", "created": "2015-02-05T18:08:43.000+0000", "epic": { "id": 143580, "key": "TIMOB-18450", "name": "Titanium Windows Module Generator", "summary": "A node script to generate the necessary code for a given module from the documentation.", "color": { "key": "color_2" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-03-14T19:54:52.000+0000", "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" } }, "components": [ { "id": "10207", "name": "Tooling" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "The generated hpp files are using 2 space indents, we use tab characters (and display them as 4-space width); the inner namespace (UI) is not indented, but should be; there's also an empty line between the namespaces, and there shouldn't be; The curly braces should be on the next line, but aren't; The closing of the inner namespace (UI) doesn't have a trailing comment, but should; there's a space after JSExport and there shouldn't be.\r\n\r\nHere's what it generates:\r\n{code:cpp}\r\n#ifndef _TITANIUMWINDOWS_TABLEVIEWROW_HPP_\r\n#define _TITANIUMWINDOWS_TABLEVIEWROW_HPP_\r\n\r\n#include \"../detail/UIBase.hpp\"\r\n\r\nnamespace TitaniumWindows {\r\n\r\nnamespace UI {\r\n\r\n using namespace HAL;\r\n\r\n /*!\r\n @class\r\n\r\n @discussion This is the Titanium.UI.TableViewRow implementation for Windows.\r\n */\r\n class TITANIUMWINDOWS_UI_EXPORT TableViewRow final : public Titanium::UI::TableViewRow, public JSExport {\r\n// ...\r\n };\r\n}\r\n} // namespace TitaniumWindows\r\n#endif // _TITANIUMWINDOWS_TABLEVIEWROW_HPP_\r\n{code}\r\n\r\nversus a good example:\r\n{code:cpp}\r\n#ifndef _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_\r\n#define _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_\r\n\r\n#include \"TitaniumWindows/UI/detail/UIBase.hpp\"\r\n#include \"ViewBase.hpp\"\r\n\r\nnamespace TitaniumWindows\r\n{\r\n\tnamespace UI\r\n\t{\r\n\t\tusing namespace HAL;\r\n\r\n\t\t/*!\r\n\t\t @class\r\n\r\n\t\t @discussion This is the Titanium.UI.TextField implementation for\r\n\t\t Windows.\r\n\t\t*/\r\n\t\tclass TITANIUMWINDOWS_UI_EXPORT TextField final : public Titanium::UI::TextField, public JSExport, public ViewBase\r\n\t\t{\r\n// ...\r\n\t\t};\r\n\t} // namespace UI\r\n} // namespace TitaniumWindows\r\n\r\n#endif // _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_\r\n{code}\r\n\r\nOn the cpp side, it's much closer. The inner namespace should be indented, but isn't; and the closing of the inner namespace doesn't have a trailing comment.", "attachment": [], "flagged": false, "summary": "Windows: module generator uses bad formatting for generated files", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 331, "state": "closed", "name": "2015 Sprint 03 Windows", "startDate": "2015-01-31T01:00:00.000Z", "endDate": "2015-02-14T01:00:00.000Z", "completeDate": "2015-02-16T21:05:06.994Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "412195", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T19:54:52.000+0000", "updated": "2017-03-14T19:54:52.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }