Open garethsb opened 3 years ago
Although this issue has been opened a long time ago, I'm just noting a possible additional solution.
This can be also resolved using double dash characters --
to signify the end of command options and beginning of arguments, like this:
cmake-lint --config-files path/to/cmake-format.json -- CMakeLists.txt
cmake-lint -c .cmake-format.py CMakeLists.txt
doesn't work.cmake-lint CMakeLists.txt -c .cmake-format.py
does.From the usage description I don't think that's intended, but it does hint at the explanation.
In the top usage description
-c
is described as taking a singleCONFIG_FILE
, and theinfilepath
s follow. In the detailed explanation,-c
is described as taking multipleCONFIG_FILES
.Presumably
-c
is swallowing theinfilepath
args if it's supplied in the more obvious place before them.