cminx -o docs/cmake -r test.cmake
2023-02-22 12:42:04,759 - cminx - INFO - Writing RST files to /Volumes/K2TB/Work/CMake/tools/develop/docs/cmake
2023-02-22 12:42:04,760 - cminx - INFO - Writing for file /Volumes/K2TB/Work/CMake/tools/develop/test.cmake
2023-02-22 12:42:04,767 - cminx.aggregator - ERROR - Caught exception while processing command beginning at line number 3
Traceback (most recent call last):
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/bin/cminx", line 10, in <module>
sys.exit(main())
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/__init__.py", line 146, in main
document(input_file, settings_obj)
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/__init__.py", line 192, in document
document_single_file(input_path, input_path, new_settings)
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/__init__.py", line 361, in document_single_file
output_writer = auto_documenter.process()
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/documenter.py", line 91, in process
self.walker.walk(self.aggregator, self.parser.cmake_file())
File "/Volumes/K2TB/Work/CMake/tools/develop/.venv/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 151, in walk
self.walk(listener, child)
File "/Volumes/K2TB/Work/Coding/CMake/tools/develop/.venv/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 149, in walk
self.enterRule(listener, t)
File "/Volumes/K2TB/Work/Coding/CMake/tools/develop/.venv/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 163, in enterRule
ctx.enterRule(listener)
File "/Volumes/K2TB/Work/Coding/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/parser/CMakeParser.py", line 180, in enterRule
listener.enterCommand_invocation(self)
File "/Volumes/K2TB/Work/Coding/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/aggregator.py", line 553, in enterCommand_invocation
raise e
File "/Volumes/K2TB/Work/Coding/CMake/tools/develop/.venv/lib/python3.8/site-packages/cminx/aggregator.py", line 536, in enterCommand_invocation
self.documented_awaiting_function_def.params.extend(param_names)
AttributeError: 'filter' object has no attribute 'extend'
Removing
add_test(NAME anyname)
or
function(myfunc paramA paramB)
endfunction()
from test.cmake or paramB from the function signature makes cminx not fail.
Expected behavior
Cminx should create the documentation.
Hmmm Github isn't notifying me again... I believe this should be a one-line change; I seem to have accidentally copied a piece of code for processing ct_add_test() to the regular add_test() processing code
Describe the bug When executing
cminx
on the following.cmake
file it fails.test.cmake
To Reproduce Steps to reproduce the behavior:
cminx -o docs/cmake -r test.cmake
Removing
or
from
test.cmake
orparamB
from the function signature makescminx
not fail.Expected behavior Cminx should create the documentation.
Additional context None