Project: titanium
Issue TIMOB-18521: Windows: module generator uses bad formatting for generated files
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: {code:cpp} #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 { // ... }; } } // namespace TitaniumWindows #endif // _TITANIUMWINDOWS_TABLEVIEWROW_HPP_ {code} versus a good example: {code:cpp} #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, public ViewBase	{ // ...	};	} // namespace UI } // namespace TitaniumWindows #endif // _TITANIUMWINDOWS_UI_TEXTFIELD_HPP_ {code} 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.
Story points: 3