diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-02 14:18:37 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-03 06:26:27 +0100 |
commit | e82333a0d8ffd51350cbab0b85bb9b81e7d5d6ba (patch) | |
tree | 01301765cc9d731a5fb41bdb4305d2db1840fcd9 | |
parent | interface*: Document only params with description (diff) | |
download | rtems-central-e82333a0d8ffd51350cbab0b85bb9b81e7d5d6ba.tar.bz2 |
content: Discard empty Doxygen blocks
-rw-r--r-- | rtemsspec/content.py | 4 | ||||
-rw-r--r-- | rtemsspec/tests/spec-interface/func6.yml | 29 | ||||
-rw-r--r-- | rtemsspec/tests/test_interface.py | 3 |
3 files changed, 36 insertions, 0 deletions
diff --git a/rtemsspec/content.py b/rtemsspec/content.py index 7f65949a..19f0bbbe 100644 --- a/rtemsspec/content.py +++ b/rtemsspec/content.py @@ -742,6 +742,10 @@ class CContent(Content): yield self.close_comment_block() + # Discard empty Doxygen blocks + if self._lines[-2] == "/**": + self._lines = self._lines[:-3] + @contextmanager def file_block(self) -> Iterator[None]: """ Opens a Doxygen @file comment block context. """ diff --git a/rtemsspec/tests/spec-interface/func6.yml b/rtemsspec/tests/spec-interface/func6.yml new file mode 100644 index 00000000..7a2455a4 --- /dev/null +++ b/rtemsspec/tests/spec-interface/func6.yml @@ -0,0 +1,29 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: null +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - int ${.:/params[0]/name} + return: void + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: h +name: Function6 +notes: null +params: +- description: null + dir: null + name: Param0 +return: + return: null + return-values: [] +type: interface diff --git a/rtemsspec/tests/test_interface.py b/rtemsspec/tests/test_interface.py index b3bf4d36..4d05d3a2 100644 --- a/rtemsspec/tests/test_interface.py +++ b/rtemsspec/tests/test_interface.py @@ -239,6 +239,9 @@ void Function( int *Param4 ); +/* Generated from spec:/func6 */ +void Function6( int Param0 ); + /* Generated from spec:/macro */ /** |