diff --git a/ext/ghoul b/ext/ghoul index 151b528b94..3ee30f00c1 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 151b528b94bb4670e52b5e32342da0100cc3e078 +Subproject commit 3ee30f00c198b65ce34ef9f2032831c6729ff35d diff --git a/include/openspace/documentation/core_registration.h b/include/openspace/documentation/core_registration.h index 4ceff8f4ee..9cac4fca85 100644 --- a/include/openspace/documentation/core_registration.h +++ b/include/openspace/documentation/core_registration.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___REGISTRATION___H__ -#define __OPENSPACE_CORE___REGISTRATION___H__ +#ifndef __OPENSPACE_CORE___CORE_REGISTRATION___H__ +#define __OPENSPACE_CORE___CORE_REGISTRATION___H__ namespace openspace { @@ -35,4 +35,4 @@ void registerCoreClasses(scripting::ScriptEngine& engine); } // namespace openspace -#endif // __OPENSPACE_CORE___REGISTRATION___H__ +#endif // __OPENSPACE_CORE___CORE_REGISTRATION___H__ diff --git a/include/openspace/properties/matrix/dmat2x3property.h b/include/openspace/properties/matrix/dmat2x3property.h index 900f31faad..69603e57c4 100644 --- a/include/openspace/properties/matrix/dmat2x3property.h +++ b/include/openspace/properties/matrix/dmat2x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT2X3PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT2X3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat2x3Property, glm::dmat2x3); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT2X3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat2x4property.h b/include/openspace/properties/matrix/dmat2x4property.h index 720ceae492..3300ec67d7 100644 --- a/include/openspace/properties/matrix/dmat2x4property.h +++ b/include/openspace/properties/matrix/dmat2x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT2X4PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT2X4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat2x4Property, glm::dmat2x4); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT2X4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat3x2property.h b/include/openspace/properties/matrix/dmat3x2property.h index 9424c3880c..15a01d557a 100644 --- a/include/openspace/properties/matrix/dmat3x2property.h +++ b/include/openspace/properties/matrix/dmat3x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT3X2PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT3X2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat3x2Property, glm::dmat3x2); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT3X2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat3x4property.h b/include/openspace/properties/matrix/dmat3x4property.h index 535ccbae92..ba460f5714 100644 --- a/include/openspace/properties/matrix/dmat3x4property.h +++ b/include/openspace/properties/matrix/dmat3x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT3X4PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT3X4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat3x4Property, glm::dmat3x4); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT3X4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat4x2property.h b/include/openspace/properties/matrix/dmat4x2property.h index 1151b54b4e..1d0e1bfc94 100644 --- a/include/openspace/properties/matrix/dmat4x2property.h +++ b/include/openspace/properties/matrix/dmat4x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT4X2PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT4X2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat4x2Property, glm::dmat4x2); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT4X2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat4x3property.h b/include/openspace/properties/matrix/dmat4x3property.h index 89bb9464e0..0843a3c944 100644 --- a/include/openspace/properties/matrix/dmat4x3property.h +++ b/include/openspace/properties/matrix/dmat4x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ -#define __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ +#ifndef __OPENSPACE_CORE___DMAT4X3PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT4X3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat4x3Property, glm::dmat4x3); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ +#endif // __OPENSPACE_CORE___DMAT4X3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat2x3property.h b/include/openspace/properties/matrix/mat2x3property.h index 8389e34e61..406834f057 100644 --- a/include/openspace/properties/matrix/mat2x3property.h +++ b/include/openspace/properties/matrix/mat2x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT2x3PROPERTY___H__ -#define __OPENSPACE_CORE___MAT2x3PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT2X3PROPERTY___H__ +#define __OPENSPACE_CORE___MAT2X3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat2x3Property, glm::mat2x3); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT2x3PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT2X3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat2x4property.h b/include/openspace/properties/matrix/mat2x4property.h index a6417c0fba..a678da4051 100644 --- a/include/openspace/properties/matrix/mat2x4property.h +++ b/include/openspace/properties/matrix/mat2x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT2x4PROPERTY___H__ -#define __OPENSPACE_CORE___MAT2x4PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT2X4PROPERTY___H__ +#define __OPENSPACE_CORE___MAT2X4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat2x4Property, glm::mat2x4); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT2x4PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT2X4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat3x2property.h b/include/openspace/properties/matrix/mat3x2property.h index 999ea31e3e..bfc5e2ef58 100644 --- a/include/openspace/properties/matrix/mat3x2property.h +++ b/include/openspace/properties/matrix/mat3x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT3x2PROPERTY___H__ -#define __OPENSPACE_CORE___MAT3x2PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT3X2PROPERTY___H__ +#define __OPENSPACE_CORE___MAT3X2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat3x2Property, glm::mat3x2); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT3x2PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT3X2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat3x4property.h b/include/openspace/properties/matrix/mat3x4property.h index 2386f25efe..8f87c3ca52 100644 --- a/include/openspace/properties/matrix/mat3x4property.h +++ b/include/openspace/properties/matrix/mat3x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT3x4PROPERTY___H__ -#define __OPENSPACE_CORE___MAT3x4PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT3X4PROPERTY___H__ +#define __OPENSPACE_CORE___MAT3X4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat3x4Property, glm::mat3x4); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT3x4PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT3X4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat4x2property.h b/include/openspace/properties/matrix/mat4x2property.h index 42c51dd17d..e57ecdaaee 100644 --- a/include/openspace/properties/matrix/mat4x2property.h +++ b/include/openspace/properties/matrix/mat4x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT4x2PROPERTY___H__ -#define __OPENSPACE_CORE___MAT4x2PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT4X2PROPERTY___H__ +#define __OPENSPACE_CORE___MAT4X2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat4x2Property, glm::mat4x2); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT4x2PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT4X2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat4x3property.h b/include/openspace/properties/matrix/mat4x3property.h index e91203d23e..cd8931479b 100644 --- a/include/openspace/properties/matrix/mat4x3property.h +++ b/include/openspace/properties/matrix/mat4x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___MAT4x3PROPERTY___H__ -#define __OPENSPACE_CORE___MAT4x3PROPERTY___H__ +#ifndef __OPENSPACE_CORE___MAT4X3PROPERTY___H__ +#define __OPENSPACE_CORE___MAT4X3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat4x3Property, glm::mat4x3); } // namespace properties } // namespace openspace -#endif // __OPENSPACE_CORE___MAT4x3PROPERTY___H__ +#endif // __OPENSPACE_CORE___MAT4X3PROPERTY___H__ diff --git a/include/openspace/scripting/script_helper.h b/include/openspace/scripting/script_helper.h index 4241e0e81f..a2c9231a26 100644 --- a/include/openspace/scripting/script_helper.h +++ b/include/openspace/scripting/script_helper.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_CORE___SCRIPTHELPER___H__ -#define __OPENSPACE_CORE___SCRIPTHELPER___H__ +#ifndef __OPENSPACE_CORE___SCRIPT_HELPER___H__ +#define __OPENSPACE_CORE___SCRIPT_HELPER___H__ #define SCRIPT_CHECK_ARGUMENTS(__category__, __stack__, __reqArg__, __realArg__) \ if (__realArg__ != __reqArg__) { \ @@ -32,5 +32,4 @@ return 0; \ } - -#endif // __OPENSPACE_CORE___SCRIPTHELPER___H__ +#endif // __OPENSPACE_CORE___SCRIPT_HELPER___H__ diff --git a/modules/debugging/debuggingmodule.h b/modules/debugging/debuggingmodule.h index ecfb7d791d..a626899a89 100644 --- a/modules/debugging/debuggingmodule.h +++ b/modules/debugging/debuggingmodule.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_BASE___DEBUGGINGMODULE___H__ -#define __OPENSPACE_MODULE_BASE___DEBUGGINGMODULE___H__ +#ifndef __OPENSPACE_MODULE_DEBUGGING___DEBUGGINGMODULE___H__ +#define __OPENSPACE_MODULE_DEBUGGING___DEBUGGINGMODULE___H__ #include @@ -39,4 +39,4 @@ protected: } // namespace openspace -#endif // __OPENSPACE_MODULE_BASE___DEBUGGINGMODULE___H__ +#endif // __OPENSPACE_MODULE_DEBUGGING___DEBUGGINGMODULE___H__ diff --git a/modules/debugging/rendering/debugrenderer.h b/modules/debugging/rendering/debugrenderer.h index 158ebd3351..8d792ffc01 100644 --- a/modules/debugging/rendering/debugrenderer.h +++ b/modules/debugging/rendering/debugrenderer.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_BASE___DEBUGRENDERER___H__ -#define __OPENSPACE_MODULE_BASE___DEBUGRENDERER___H__ +#ifndef __OPENSPACE_MODULE_DEBUGGING___DEBUGRENDERER___H__ +#define __OPENSPACE_MODULE_DEBUGGING___DEBUGRENDERER___H__ #include #include @@ -162,4 +162,4 @@ protected: } // namespace openspace -#endif // __OPENSPACE_MODULE_BASE___DEBUGRENDERER___H__ +#endif // __OPENSPACE_MODULE_DEBUGGING___DEBUGRENDERER___H__ diff --git a/modules/debugging/rendering/renderabledebugplane.h b/modules/debugging/rendering/renderabledebugplane.h index 7ce37d423e..96df652354 100644 --- a/modules/debugging/rendering/renderabledebugplane.h +++ b/modules/debugging/rendering/renderabledebugplane.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_BASE___RENDERABLEDEBUGPLANE___H__ -#define __OPENSPACE_MODULE_BASE___RENDERABLEDEBUGPLANE___H__ +#ifndef __OPENSPACE_MODULE_DEBUGGING___RENDERABLEDEBUGPLANE___H__ +#define __OPENSPACE_MODULE_DEBUGGING___RENDERABLEDEBUGPLANE___H__ #include @@ -82,4 +82,4 @@ private: } // namespace openspace -#endif // __OPENSPACE_MODULE_BASE___RENDERABLEDEBUGPLANE___H__ +#endif // __OPENSPACE_MODULE_DEBUGGING___RENDERABLEDEBUGPLANE___H__ diff --git a/modules/globebrowsing/globebrowsingmodule.h b/modules/globebrowsing/globebrowsingmodule.h index 407152848b..942aea1819 100644 --- a/modules/globebrowsing/globebrowsingmodule.h +++ b/modules/globebrowsing/globebrowsingmodule.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING___H__ -#define __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING___H__ +#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING_MODULE___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING_MODULE___H__ #include @@ -39,4 +39,4 @@ protected: } // namespace openspace -#endif // __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING___H__ +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEBROWSING_MODULE___H__ diff --git a/modules/globebrowsing/other/statscollector.h b/modules/globebrowsing/other/statscollector.h index 5d12d3159c..af1f6e57e6 100644 --- a/modules/globebrowsing/other/statscollector.h +++ b/modules/globebrowsing/other/statscollector.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___STATS_TRACKER___H__ -#define __OPENSPACE_MODULE_GLOBEBROWSING___STATS_TRACKER___H__ +#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___STATS_COLLECTOR___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___STATS_COLLECTOR___H__ #include @@ -121,4 +121,4 @@ private: #include "statscollector.inl" -#endif // __OPENSPACE_MODULE_GLOBEBROWSING___STATS_TRACKER___H__ +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___STATS_COLLECTOR___H__ diff --git a/modules/globebrowsing/tile/asynctilereader.h b/modules/globebrowsing/tile/asynctilereader.h index 1e34209002..3208783b45 100644 --- a/modules/globebrowsing/tile/asynctilereader.h +++ b/modules/globebrowsing/tile/asynctilereader.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_DATA_PROVIDER___H__ -#define __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_DATA_PROVIDER___H__ +#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_READER___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_READER___H__ #include #include @@ -107,4 +107,4 @@ private: } // namespace globebrowsing } // namespace openspace -#endif // __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_DATA_PROVIDER___H__ +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___ASYNC_TILE_READER___H__ diff --git a/modules/kameleon/include/kameleonwrapper.h b/modules/kameleon/include/kameleonwrapper.h index 2268b10695..1b4149e95f 100644 --- a/modules/kameleon/include/kameleonwrapper.h +++ b/modules/kameleon/include/kameleonwrapper.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_ISWA___KAMELEONWRAPPER___H__ -#define __OPENSPACE_MODULE_ISWA___KAMELEONWRAPPER___H__ +#ifndef __OPENSPACE_MODULE_KAMELEON___KAMELEONWRAPPER___H__ +#define __OPENSPACE_MODULE_KAMELEON___KAMELEONWRAPPER___H__ #include @@ -179,4 +179,4 @@ private: } // namespace openspace -#endif // __OPENSPACE_MODULE_ISWA___KAMELEONWRAPPER___H__ +#endif // __OPENSPACE_MODULE_KAMELEON___KAMELEONWRAPPER___H__ diff --git a/modules/kameleon/kameleonmodule.h b/modules/kameleon/kameleonmodule.h index d8acde2303..fce0c25746 100644 --- a/modules/kameleon/kameleonmodule.h +++ b/modules/kameleon/kameleonmodule.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_ISWA___KAMELEONMODULE___H__ -#define __OPENSPACE_MODULE_ISWA___KAMELEONMODULE___H__ +#ifndef __OPENSPACE_MODULE_KAMELEON___KAMELEONMODULE___H__ +#define __OPENSPACE_MODULE_KAMELEON___KAMELEONMODULE___H__ #include @@ -36,4 +36,4 @@ public: } // namespace openspace -#endif // __OPENSPACE_MODULE_ISWA___KAMELEONMODULE___H__ +#endif // __OPENSPACE_MODULE_KAMELEON___KAMELEONMODULE___H__ diff --git a/modules/newhorizons/newhorizonsmodule.h b/modules/newhorizons/newhorizonsmodule.h index c44edcdb9a..ac5bbcf5b1 100644 --- a/modules/newhorizons/newhorizonsmodule.h +++ b/modules/newhorizons/newhorizonsmodule.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS___H__ -#define __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS___H__ +#ifndef __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS_MODULE___H__ +#define __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS_MODULE___H__ #include @@ -41,4 +41,4 @@ protected: } // namespace openspace -#endif // __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS___H__ +#endif // __OPENSPACE_MODULE_NEWHORIZONS___NEWHORIZONS_MODULE___H__ diff --git a/support/coding/check_style_guide.py b/support/coding/check_style_guide.py index e5f81ca23e..4940eede90 100644 --- a/support/coding/check_style_guide.py +++ b/support/coding/check_style_guide.py @@ -25,13 +25,19 @@ This script traverses the file tree of OpenSpace and will check all files' inclu guards for correctness. At the moment this includes: * Correctness (file has a #ifndef. #define, and #endif lines) * Equality (using the same name for the #ifdef and #define) - * Styling (no empty line between #ifndef and #define lines, empty lines before and - after #ifndef #define block, files end with an empty line, and copyright header - is correctly indented) + * Styling + * no empty line between #ifndef and #define lines + * Empty lines before and after #ifndef #define block + * Files end with an empty line + * Copyright header is correctly indented + * Include guard correctly uses the filename + * Include guard is all upper case * Correct usage of the name in the final comment of the file * Correct year of copyright notice - * Naming convention (OpenSpace include guards start with OPENSPACE, Ghoul with GHOUL, - module includes have the module name in it) + * Naming convention + * OpenSpace include guards start with OPENSPACE, Ghoul with GHOUL, + module includes have the module name in it + * The correct submodule is used * Checking for duplicates between all files If this script is executed from the base directory of OpenSpace, no arguments need to @@ -41,6 +47,7 @@ Thus, the default value of the first argument is '.' import fnmatch import glob +import os import re import sys @@ -89,7 +96,7 @@ def check_equality(lines): return ifndef + ' ' + define def check_styling(lines): - _, ifndef_line = get_ifndef_symbol(lines) + ifndef_symbol, ifndef_line = get_ifndef_symbol(lines) _, define_line = get_define_symbol(lines) if abs(ifndef_line - define_line) != 1: @@ -108,8 +115,18 @@ def check_styling(lines): if l[0] != ' ': return 'Copyright header must be indented' + if ifndef_symbol != ifndef_symbol.upper(): + return 'Include guard is not all upper case' + return '' +def check_styling_filename(lines, filename): + ifndef_symbol, _ = get_ifndef_symbol(lines) + file = os.path.splitext(os.path.basename(filename))[0].upper() + + if not (file in ifndef_symbol or file in ifndef_symbol.replace('_', '')): + return 'Malformed include guard: ' + ifndef_symbol + ' || ' + file + def check_comment(lines): ifndef_symbol, _ = get_ifndef_symbol(lines) @@ -137,13 +154,29 @@ def check_copyright(lines): else: return '' -def check_naming_convention(lines, component): +def check_naming_convention_component(lines, component): ifndef_symbol, _ = get_ifndef_symbol(lines) component_part = ifndef_symbol[2:2 + len(component)] if component_part != component.upper(): - return '#ifndef naming convention broken: ' + ifndef_symbol + ' // ' + component.upper() + return '#ifndef naming convention broken: ' + ifndef_symbol + ' || ' + component.upper() + else: + return '' + +def check_naming_convention_subcomponent(lines, component, file): + ifndef_symbol, _ = get_ifndef_symbol(lines) + + if component == "ghoul" or component == "openspace_core": + return + + subcomponent_part = ifndef_symbol[2 + len(component) + 1 :] + subcomponent_part = subcomponent_part[: subcomponent_part.find('_')] + + path_part = file.split(os.sep)[2] + + if path_part.upper() != subcomponent_part: + return 'Subcomponent naming convention broken: ' + ifndef_symbol else: return '' @@ -175,6 +208,12 @@ def check_file(file, component): print(file, '\t', 'Styling check failed', '\t', styling) return + styling_filename = check_styling_filename(lines, file) + if styling_filename: + print(file, '\t', 'Filename styling check failed', '\t', styling_filename) + return + + comment = check_comment(lines) if comment: print(file, '\t', 'Comment check failed', '\t', comment) @@ -185,9 +224,14 @@ def check_file(file, component): print(file, '\t', 'Copyright check failed', '\t', copyright) return - naming = check_naming_convention(lines, component) - if naming: - print(file, '\t', 'Naming convention broken', '\t', naming) + naming_component = check_naming_convention_component(lines, component) + if naming_component: + print(file, '\t', 'Naming convention broken', '\t', naming_component) + return + + naming_subcomponent = check_naming_convention_subcomponent(lines, component, file) + if naming_subcomponent: + print(file, '\t', 'Naming convention broken', '\t', naming_subcomponent) return duplicates, symbol = check_duplicates(lines, previousSymbols)