0

I want to run cpplint.py on all my .cpp files in a folder in Windows CMD.

py .\cpplint.py *.cpp

This somehow doesn't work. I get the Error:

Skipping input '*.cpp': Can't open for reading
Total errors found: 0

I thought * would be the operator for select all, am I wrong?

P.S.: There's a similar post, but it didn't really help.

Paul Sanders
  • 24,133
  • 4
  • 26
  • 48
jnk
  • 1

2 Answers2

1

Windows' CMD doesn't do wildcard expansion: https://superuser.com/questions/460598/is-there-any-way-to-get-the-windows-cmd-shell-to-expand-wildcard-paths

It's up to the application to handle the expansion of * into paths on Windows, which is in stark contrast to Linux, where the shell itself handles that. So you're passing the string-literal * to cpplint.py, which is not a file.

Chance
  • 440
  • 2
  • 6
0

In a batch file or from the command line you can do:

for %%f in (*.cpp) do py .\cpplint.py %%f
Paul Sanders
  • 24,133
  • 4
  • 26
  • 48