Thank you for these great tools!
We have encountered a little problem with it, and it's quite easy to reproduce: cmake-lint crashes with empty file (default config)
$ touch empty.cmake
$ cmake-lint empty.cmake
ERROR An internal error occured. Please consider filing a bug report at github.com/cheshirekow/cmakelang/issues
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/__main__.py", line 185, in main
return inner_main()
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/__main__.py", line 168, in inner_main
process_file(cfg, local_ctx, intext)
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/__main__.py", line 47, in process_file
checker.check_parse_tree(parse_tree)
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/basic_checker.py", line 825, in check_parse_tree
self.check_tree(node)
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/basic_checker.py", line 806, in check_tree
self.check_body(node)
File "/usr/local/lib/python3.9/site-packages/cmakelang/lint/basic_checker.py", line 546, in check_body
lineno = node.get_tokens()[-1].get_location().line
IndexError: list index out of range
Thank you for these great tools! We have encountered a little problem with it, and it's quite easy to reproduce: cmake-lint crashes with empty file (default config)
cmake-lint version: 0.6.13 (installed from pip)