charkost / prosopite

:mag: Rails N+1 queries auto-detection with zero false positives / false negatives
Apache License 2.0
1.53k stars 46 forks source link

Add support to ignore specific file paths from Prosopite scans #81

Open sunnybogawat opened 3 months ago

sunnybogawat commented 3 months ago

Hi,

I am currently using the Prosopite gem in my Rails application and it's working great for detecting N+1 queries. However, I have a use case where I need to exclude specific file paths from being scanned by Prosopite.

Feature Request:

Add a configuration option to ignore specific file paths from Prosopite scans. Use Case:

In my application, I have some auto-generated files or third-party libraries or any specific models or controllers that I do not want to include in the Prosopite scans. Having the ability to exclude these paths would help in avoiding false positives and unnecessary scans. The current option to use query regex is cumbersome

Proposed Solution:

Provide a method to specify paths or patterns to ignore, similar to:

Prosopite.ignore_paths = [/\/path_to_ignore/, /\/another_path_to_ignore/]