Test scan command provided by the test plugin. This is a placeholder command to verify plugin commands work.
(file_path: str | None = None, text: str | None = None)
| 14 | @click.argument("file_path", required=False) |
| 15 | @click.option("--text", "-t", help="Text to scan instead of a file") |
| 16 | def test_scan_cmd(file_path: str | None = None, text: str | None = None) -> None: |
| 17 | """ |
| 18 | Test scan command provided by the test plugin. |
| 19 | |
| 20 | This is a placeholder command to verify plugin commands work. |
| 21 | """ |
| 22 | from ggshield.core import ui |
| 23 | |
| 24 | if text: |
| 25 | ui.display_info(f"Would scan text: {text[:50]}...") |
| 26 | elif file_path: |
| 27 | ui.display_info(f"Would scan file: {file_path}") |
| 28 | else: |
| 29 | ui.display_error("Please provide a file path or --text option") |
| 30 | |
| 31 | |
| 32 | @click.command("test-info") |
nothing calls this directly
no test coverage detected