yapf icon indicating copy to clipboard operation
yapf copied to clipboard

yapf should error out and list targets which are not found

Open jamesbroadhead opened this issue 9 years ago • 1 comments

$ yapf 404.py yapf: Input filenames did not match any python files # good!

$ yapf -i exists.py 404.py exit code == 0 # bad :(

expected: $ yapf -i exists.py 404.py stderr>>"yapf: Input argument did not match any python files: 404.py" exit code == 3

jamesbroadhead avatar Jan 07 '16 15:01 jamesbroadhead

I'd also suggest: sometimes the input file exists, but is excluded in the .yapfignore. So the error message should probably also include a list of python files that are excluded. I just spent some very confused time with this. 😂

$ yapf -i path/to/excluded_file.py
yapf: Input argument did not match any python files

Preferred behaviour would be:

$ yapf -i path/to/excluded_file.py
yapf: input argument path/to/excluded_file.py exists, but was excluded by .yapfignore

jni avatar Oct 30 '23 07:10 jni