Re: [PATCH] gen_compile_commands: prune some directories

2021-02-15 Thread Masahiro Yamada
On Fri, Feb 12, 2021 at 2:19 AM Nathan Chancellor wrote: > > On Fri, Feb 12, 2021 at 01:11:54AM +0900, Masahiro Yamada wrote: > > If directories are passed to gen_compile_commands.py, os.walk() traverses > > all the subdirectories to search for .cmd files, but we know some of them > > are not wort

Re: [PATCH] gen_compile_commands: prune some directories

2021-02-11 Thread Nathan Chancellor
On Fri, Feb 12, 2021 at 01:11:54AM +0900, Masahiro Yamada wrote: > If directories are passed to gen_compile_commands.py, os.walk() traverses > all the subdirectories to search for .cmd files, but we know some of them > are not worth traversing. > > Use the 'topdown' parameter of os.walk to prune t

[PATCH] gen_compile_commands: prune some directories

2021-02-11 Thread Masahiro Yamada
If directories are passed to gen_compile_commands.py, os.walk() traverses all the subdirectories to search for .cmd files, but we know some of them are not worth traversing. Use the 'topdown' parameter of os.walk to prune them. Documentation about the 'topdown' option of os.walk: When topdown i