From: Vladimír Vondruš Date: Thu, 7 May 2020 15:41:49 +0000 (+0200) Subject: documentation/doxygen: don't warn about _EXPORT / _LOCAL. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=05ea54c68b8891ebff6191c67095a7a44fc84763;p=blog.git documentation/doxygen: don't warn about _EXPORT / _LOCAL. Magnum-specific, was added at a time when this wasn't used anywhere else. It doesn't make sense to have this here, as every project would need a different set of checks. Could be doable externally via various hooks, removing this for now. --- diff --git a/documentation/doxygen.py b/documentation/doxygen.py index 1b32c6d2..6bb6b8bf 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -281,10 +281,6 @@ def parse_type(state: State, type: ET.Element) -> str: if i.tail: out += html.escape(i.tail) - # Warn if suspicious stuff is present - if '_EXPORT' in out or '_LOCAL' in out: - logging.warning("{}: type contains an export macro: {}".format(state.current, ''.join(type.itertext()))) - # Remove spacing inside <> and before & and * return fix_type_spacing(out) diff --git a/documentation/test_doxygen/compound_warnings/Doxyfile b/documentation/test_doxygen/compound_warnings/Doxyfile deleted file mode 100644 index 8093fd2e..00000000 --- a/documentation/test_doxygen/compound_warnings/Doxyfile +++ /dev/null @@ -1,18 +0,0 @@ -INPUT = File.h -QUIET = YES -GENERATE_HTML = NO -GENERATE_LATEX = NO -GENERATE_XML = YES -XML_PROGRAMLISTING = NO -PREDEFINED = DOXYGEN_GENERATING_OUTPUT -CASE_SENSE_NAMES = YES - -# Enable to get rid of the MAGNUM_EXPORT macro in the output -# MACRO_EXPANSION = YES - -##! M_PAGE_FINE_PRINT = -##! M_THEME_COLOR = -##! M_FAVICON = -##! M_LINKS_NAVBAR1 = -##! M_LINKS_NAVBAR2 = -##! M_SEARCH_DISABLED = YES diff --git a/documentation/test_doxygen/compound_warnings/File.h b/documentation/test_doxygen/compound_warnings/File.h deleted file mode 100644 index 1af0ace6..00000000 --- a/documentation/test_doxygen/compound_warnings/File.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DOXYGEN_GENERATING_OUTPUT -#define MAGNUM_EXPORT __attribute__ ((visibility ("default"))) -#else -#define MAGNUM_EXPORT -#endif - -/** @brief Root namespace */ -namespace Magnum { - -/** @brief Always returns `true` */ -constexpr bool MAGNUM_EXPORT hasCoolThings() { return true; } - -} diff --git a/documentation/test_doxygen/compound_warnings/namespaceMagnum.html b/documentation/test_doxygen/compound_warnings/namespaceMagnum.html deleted file mode 100644 index 06a85ed2..00000000 --- a/documentation/test_doxygen/compound_warnings/namespaceMagnum.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Magnum namespace | My Project - - - - - -
-
-
-
-
-

- Magnum namespace -

-

Root namespace.

-
-

Contents

- -
-
-

Functions

-
-
- auto hasCoolThings() -> bool MAGNUM_EXPORT constexpr -
-
Always returns true
-
-
-
-
-
-
- - diff --git a/documentation/test_doxygen/test_compound.py b/documentation/test_doxygen/test_compound.py index ace70e42..3d15b3f9 100644 --- a/documentation/test_doxygen/test_compound.py +++ b/documentation/test_doxygen/test_compound.py @@ -133,15 +133,6 @@ class Ignored(IntegrationTestCase): self.run_doxygen(index_pages=[], wildcard='classBrief.xml') self.assertFalse(os.path.exists(os.path.join(self.path, 'html', 'classBrief.html'))) -class Warnings(IntegrationTestCase): - def __init__(self, *args, **kwargs): - super().__init__(__file__, 'warnings', *args, **kwargs) - - def test(self): - # Should warn that an export macro is present in the XML - self.run_doxygen(wildcard='namespaceMagnum.xml') - self.assertEqual(*self.actual_expected_contents('namespaceMagnum.html')) - class Modules(IntegrationTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, 'modules', *args, **kwargs)