codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

Allow specifiying relative paths in the `--file` option without `*`

Open vodorok opened this issue 1 year ago • 0 comments

With this modification, the --file option would allow passing paths with folder prefixes.

Consider a compilation json that contains a . in the directory fields, with the following example directory layout:

.                            
├── compile_commnands.json
├── include                                
│   └── lib.h                    
├── lib                                                                               
│   └── lib.cpp                                                                       
├── Makefile                                                                          
└── src                                                                               
    ├── a.cpp            
    └── b.cpp  

Before this patch, you could only specify path to source files with the --file option, that were not absolute is to add a * before the directory name.
CodeChecker analyze ./compile_commnands.json -o ./reports --file "*src/b.cpp"

After this patch the following two methods will also work: CodeChecker analyze ./compile_commnands.json -o ./reports --file "./src/b.cpp" CodeChecker analyze ./compile_commnands.json -o ./reports --file "src/b.cpp"

TBD.:

  • Documentation changes

vodorok avatar Mar 04 '24 14:03 vodorok