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 doesn't work with test folder in 0.9.6 #2062

Closed
Pet3ris opened this issue Jul 21, 2023 · 4 comments
Closed

[Bug-Candidate]: filter_paths doesn't work with test folder in 0.9.6 #2062

Pet3ris opened this issue Jul 21, 2023 · 4 comments
Labels
bug-candidate Bugs reports that are not yet confirmed

Comments

@Pet3ris
Copy link

Pet3ris commented Jul 21, 2023

Describe the issue:

I recently tried to use filter paths on a private Foundry repository (that compiles successfully) to filter out test folder.

The run failed due to issues that were coming from the test files.

The repository runs without any issues with solstat, pyrometer and solhint.

I've mentioned this to your team but creating a tracking issue here just in case.

Code example to reproduce the issue:

slither . --filter-paths "test"

Version:

0.9.6

Relevant log output:

No response

@Pet3ris Pet3ris added the bug-candidate Bugs reports that are not yet confirmed label Jul 21, 2023
@smonicas
Copy link
Collaborator

Is the issue that filter_paths doesn't filter the results correctly or that slither crashes due to errors in tests and you would expect that by filtering them out slither should work? If the latter slither filters after running detectors/the core operations so that's why it would still fail, you can use this command to not compile scripts and tests in foundry so slither doesn't see them forge build --build-info --skip '*/test/**' --skip '*/script/**' --force && slither . --ignore-compile in the future it should be done automatically by slither.

@Pet3ris
Copy link
Author

Pet3ris commented Jul 21, 2023

Thanks @smonicas!

This reveals another error but definitely fixes this issue. Thanks a lot :).

Feel free to close!

@smonicas
Copy link
Collaborator

If the new issue is an assertion error and you have the small snippet of code that should cause it you can open a new issue and maybe we can help even without the full codebase. Otherwise you can look in the open issues about assertion error and see if it's failing at the same point.

@smonicas
Copy link
Collaborator

I close this but leave a reference at #2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-candidate Bugs reports that are not yet confirmed
Projects
None yet
Development

No branches or pull requests

2 participants