Ignore files and directories
As a user, I want a way to ignore files and directories from the cognitive complexity analysis to exclude some custom fixes for libraries.
Issue can be solved using a filter before scanning the complexity (https://github.com/rohaquinlop/complexipy/blob/main/src/cognitive_complexity/mod.rs#L150-L160).
Ignored files and directories can be discovered with:
- CLI approach with
--ignore-paths=flag. - Read a file like a .gitignore to ignore paths.
Hey @juansedo I think that the .gitignore file is already being considered during the execution, isn't it working?
Sorry for the delay! Yes, but I want to exclude files from complexipy without excluding them from version control.
Same for us. We have bunch of autogenerated code based on openapi specs e.g. for schema validation and we have it under version control but we would like to exclude it from complexipy results.