[TIMOB-18521] Windows: module generator uses bad formatting for generated files
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-02-06T14:17:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling, Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2015-02-05T18:08:43.000+0000 |
Updated | 2017-03-14T19:54:52.000+0000 |
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.
Here's what it generates:
#ifndef _TITANIUMWINDOWS_TABLEVIEWROW_HPP_
#define _TITANIUMWINDOWS_TABLEVIEWROW_HPP_
#include "../detail/UIBase.hpp"
namespace TitaniumWindows {
namespace UI {
using namespace HAL;
/*!
@class
@discussion This is the Titanium.UI.TableViewRow implementation for Windows.
*/
class TITANIUMWINDOWS_UI_EXPORT TableViewRow final : public Titanium::UI::TableViewRow, public JSExport <TableViewRow> {
// ...
};
}
} // namespace TitaniumWindows
#endif // _TITANIUMWINDOWS_TABLEVIEWROW_HPP_
versus a good example:
#ifndef _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_
#define _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_
#include "TitaniumWindows/UI/detail/UIBase.hpp"
#include "ViewBase.hpp"
namespace TitaniumWindows
{
namespace UI
{
using namespace HAL;
/*!
@class
@discussion This is the Titanium.UI.TextField implementation for
Windows.
*/
class TITANIUMWINDOWS_UI_EXPORT TextField final : public Titanium::UI::TextField, public JSExport<TextField>, public ViewBase
{
// ...
};
} // namespace UI
} // namespace TitaniumWindows
#endif // _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_
On 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.
Closing ticket as fixed.