Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the pattern to match for testing code
The existing pattern to match whether the code analyzed was testing code was a little too frequent. At the very least it would always match the example code snippets in the tests of precli itself. And we can't have instructions that inform users to run precli against those examples if they always get ignored. So this change changes the matching algorithm to filter out testing code only if all conditions are met, instead of just one. So the python file needs to be a directory path with "tests", filename beginning with "tests_", and in a function name starting with "test_". In the future, these checks on whether it is test code or not need to be configurable in a precli configuration file of sorts. Signed-off-by: Eric Brown <[email protected]>
- Loading branch information