Closed liudmylaru closed 1 year ago
Added 3 pre-commit hooks:
Jira: https://jira.oci.oraclecorp.com/browse/ODSC-42791 (more details about chosen solution in comments in this ticket)
Created virtual environment is project folder, installed pre-commit, made changes in project file - added password and ocid. Output (expected):
(venv) (base) lrudenka@lrudenka-mac ocifs % git add . && git commit -m test trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check docstring is first.................................................Failed - hook id: check-docstring-first - exit code: 1 ocifs/core.py:36: Module docstring appears after code (code seen on line 6). check yaml...........................................(no files to check)Skipped check for added large files..............................................Passed black....................................................................Passed Detect hardcoded secrets.................................................Failed - hook id: gitleaks - exit code: 1 ○ │╲ │ ○ ○ ░ ░ gitleaks Finding: password = "REDACTED"" Secret: REDACTED RuleID: generic-secret Entropy: 3.277613 File: ocifs/core.py Line: 38 Fingerprint: ocifs/core.py:generic-secret:38 Finding: "REDACTED" Secret: REDACTED RuleID: ocid Entropy: 4.663069 File: ocifs/core.py Line: 36 Fingerprint: ocifs/core.py:ocid:36 2:00PM INF 1 commits scanned. 2:00PM INF scan completed in 68.9ms 2:00PM WRN leaks found: 2 check-copyright..........................................................Failed - hook id: check-copyright - exit code: 1 ocifs/core.py: Copyright text missing or incomplete. (venv) (base) lrudenka@lrudenka-mac ocifs %
Description
Added 3 pre-commit hooks:
Jira: https://jira.oci.oraclecorp.com/browse/ODSC-42791 (more details about chosen solution in comments in this ticket)
Validation
Created virtual environment is project folder, installed pre-commit, made changes in project file - added password and ocid. Output (expected):