chiark / gitweb /
documentation/doxygen: don't warn about _EXPORT / _LOCAL.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 7 May 2020 15:41:49 +0000 (17:41 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 7 May 2020 18:24:39 +0000 (20:24 +0200)
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.

documentation/doxygen.py
documentation/test_doxygen/compound_warnings/Doxyfile [deleted file]
documentation/test_doxygen/compound_warnings/File.h [deleted file]
documentation/test_doxygen/compound_warnings/namespaceMagnum.html [deleted file]
documentation/test_doxygen/test_compound.py

index 1b32c6d2b4da9161e56a29dde8d053379bf19d7d..6bb6b8bf1818ad43cfcd3bab44229f22fb996c0f 100755 (executable)
@@ -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 (file)
index 8093fd2..0000000
+++ /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 (file)
index 1af0ace..0000000
+++ /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 (file)
index 06a85ed..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-  <meta charset="UTF-8" />
-  <title>Magnum namespace | My Project</title>
-  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
-  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-</head>
-<body>
-<header><nav id="navigation">
-  <div class="m-container">
-    <div class="m-row">
-      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
-    </div>
-  </div>
-</nav></header>
-<main><article>
-  <div class="m-container m-container-inflatable">
-    <div class="m-row">
-      <div class="m-col-l-10 m-push-l-1">
-        <h1>
-          Magnum <span class="m-thin">namespace</span>
-        </h1>
-        <p>Root namespace.</p>
-        <div class="m-block m-default">
-          <h3>Contents</h3>
-          <ul>
-            <li>
-              Reference
-              <ul>
-                <li><a href="#func-members">Functions</a></li>
-              </ul>
-            </li>
-          </ul>
-        </div>
-        <section id="func-members">
-          <h2><a href="#func-members">Functions</a></h2>
-          <dl class="m-doc">
-            <dt id="a7f3d59790996b9f86ca6d4adc63549e2">
-              <span class="m-doc-wrap-bumper">auto <a href="#a7f3d59790996b9f86ca6d4adc63549e2" class="m-doc-self">hasCoolThings</a>(</span><span class="m-doc-wrap">) -&gt; bool MAGNUM_EXPORT <span class="m-label m-flat m-primary">constexpr</span></span>
-            </dt>
-            <dd>Always returns <code>true</code></dd>
-          </dl>
-        </section>
-      </div>
-    </div>
-  </div>
-</article></main>
-</body>
-</html>
index ace70e42ba87d051d5ab296ea793bae201419e01..3d15b3f97da35c8dea91ead9316837ed6cc24455 100644 (file)
@@ -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)