Create a file test.cmake with the following content:
file(STRINGS filename.ext variable REGEX regex)
Run cmake-format:
cmake-format test.cmake
Expected Result
The command cmake-format prints a nicely formatted version of the given CMake code.
Actual Result
The command fails with an Attribute Error:
While processing test.cmake
Traceback (most recent call last):
File "pyenv/versions/3.7.3/bin/cmake-format", line 11, in <module>
load_entry_point('cmake-format==0.5.1.dev0', 'console_scripts', 'cmake-format')()
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/__main__.py", line 439, in main
process_file(cfg, infile, outfile, args.dump)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/__main__.py", line 113, in process_file
parse_tree = parser.parse(tokens, parse_db)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parser.py", line 1066, in parse
return consume_body(tokens, parse_db)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parser.py", line 1042, in consume_body
subtree = consume_statement(tokens, parse_db)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parser.py", line 924, in consume_statement
subtree = parse_fun(tokens, breakstack)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parse_funs.py", line 942, in parse_file
return parsemap[descriminator](tokens, breakstack)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parse_funs.py", line 596, in parse_file_strings
breakstack=breakstack)
File "pyenv/versions/3.7.3/lib/python3.7/site-packages/cmake_format-0.5.1.dev0-py3.7.egg/cmake_format/parser.py", line 550, in parse_standard
kwarg_breakstack = breakstack + [KwargBreaker(list(kwargs.keys()) + flags)]
AttributeError: 'set' object has no attribute 'keys'
Steps to Reproduce
Create a file
test.cmake
with the following content:Run
cmake-format
:Expected Result
The command
cmake-format
prints a nicely formatted version of the given CMake code.Actual Result
The command fails with an
Attribute Error
:.
System Information
0.5.1.dev0
10.14.4