Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug-Candidate]: filter paths documentation is incorrect #1144

Closed
engn33r opened this issue Mar 26, 2022 · 2 comments
Closed

[Bug-Candidate]: filter paths documentation is incorrect #1144

engn33r opened this issue Mar 26, 2022 · 2 comments

Comments

@engn33r
Copy link

engn33r commented Mar 26, 2022

Describe the issue:

The --filter-paths CLI argument and the "filter_paths" config file value serve the same purpose, which is to filter out specific files or directories from slither output. The way to provide multiple values to the CLI argument or the config file value is to separate the values with a | character. Multiple locations indicate a comment is the proper approach, which is incorrect. Using a comma will lead to filter the first value and ignoring all other values.

This documentation typo exists in at least two locations, there may be others:

  1. The example config file in the wiki has a typo https://github.com/crytic/slither/wiki/Usage#configuration-file
  2. The slither -h help message
    help="Comma-separated list of paths for which results will be excluded",

To separate multiple filter_paths values in the config file, the | character should be used, not a ,

#769 can be closed unless a comma separated list is preferred.

Code example to reproduce the issue:

Run slither twice, once using the config file example format and once using a | to separate multiple filter_path values. Do the same with the CLI "--filter-paths" argument. Using a comma causes all values after the first value to be ignored.

Version:

Slither 0.8.2

Relevant log output:

No response

@engn33r engn33r added the bug-candidate Bugs reports that are not yet confirmed label Mar 26, 2022
@0xalpharush 0xalpharush added documentation and removed bug-candidate Bugs reports that are not yet confirmed labels Mar 29, 2022
@0xalpharush
Copy link
Contributor

Thanks for bringing this to our attention. The filter-paths uses regex so separating filters with | is correct.

@engn33r
Copy link
Author

engn33r commented Apr 14, 2023

Fixed by #1749

@engn33r engn33r closed this as completed Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants