Determine if a file should be skipped during AST parsing.
(file_path: Path)
| 135 | Shown at the start of every scan. The verbose ``[*]`` progress lines that |
| 136 | follow are gated by --debug. |
| 137 | """ |
| 138 | click.echo(click.style(_BANNER)) |
| 139 | click.echo(f"Version: {_get_version()}") |
| 140 | click.echo("Made with <3 by github.com/ParzivalHack\n") |
| 141 | note = get_startup_note() |
| 142 | click.echo(click.style(f"{note}\n", fg="bright_black", italic=True)) |
| 143 | |
| 144 | |
| 145 | def should_skip_file(file_path: Path) -> bool: |
| 146 | """Determine if a file should be skipped during AST parsing.""" |
| 147 | path_str = str(file_path) |
| 148 | skip_patterns = [ |
| 149 | '/tests/fixtures/', |
| 150 | '/test/fixtures/', |
| 151 | '/testdata/', |
| 152 | '/_fixtures/', |
| 153 | '/fixtures/', |
| 154 | ] |
| 155 | for pattern in skip_patterns: |
| 156 | if pattern in path_str.replace('\\', '/'): |
| 157 | return True |
no outgoing calls
no test coverage detected