details: -Python 3.7.5 -Precommit 2.6.0 -prospector 1.1.7 -VScode editor
I have a problem with the hook prospector.I have installed pre-commit using pip, and when I use its CLI without hook prospector in the config .yaml, everything goes fine:
(env) C:\Users\Manuel\Desktop\solution>pre-commit run --all-files
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...........................................(no files to check)Skipped
Check for added large files..............................................Passed
Check python ast.........................................................Passed
Check JSON...........................................(no files to check)Skipped
Check for case conflicts.................................................Passed
Check for merge conflicts................................................Passed
Detect Private Key.......................................................Passed
Debug Statements (Python)................................................Passed
Mixed line ending........................................................Passed
mypy.....................................................................Passed
finally when I append the hook prospector in the last four lines at the .pre-commit-config.yaml as it's shown bellow:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-case-conflict
- id: check-merge-conflict
- id: detect-private-key
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.782' # Use the sha / tag you want to point at
hooks:
- id: mypy
- repo: https://github.com/PyCQA/prospector
rev: "1.1.7" # The version of Prospector to use, at least 1.1.7
hooks:
- id: prospector
when I run it again, show the next message:
(env) C:\Users\Manuel\Desktop\solution>pre-commit run --all-files
[INFO] Initializing environment for https://github.com/PyCQA/prospector.
An unexpected error has occurred: CalledProcessError: command: ('C:\\Program Files\\Git\\cmd\\git.EXE', 'checkout', '1.1.7')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: cannot stat 'tests/finder/testdata/venvs/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv': Filename too long
error: The following untracked working tree files would be overwritten by checkout:
.coveragerc
.gitignore
.pre-commit-config.yaml
.pre-commit-hooks.yaml
.prospector.yml
.travis.yml
CHANGELOG.md
CONTRIBUTORS.md
LICENSE
MANIFEST.in
README.rst
docs/Makefile
docs/conf.py
docs/contrib.rst
docs/index.rst
docs/profiles.rst
docs/requirements.txt
docs/supported_tools.rst
docs/suppression.rst
docs/usage.rst
prospector/__init__.py
prospector/__main__.py
prospector/__pkginfo__.py
prospector/autodetect.py
prospector/blender.py
prospector/blender_combinations.yaml
prospector/config/__init__.py
prospector/config/configuration.py
prospector/config/datatype.py
prospector/encoding.py
prospector/exceptions.py
prospector/finder.py
prospector/formatters/__init__.py
prospector/formatters/base.py
prospector/formatters/emacs.py
prospector/formatters/grouped.py
prospector/formatters/json.py
prospector/formatters/pylint.py
prospector/formatters/text.py
prospector/formatters/vscode.py
prospector/formatters/xunit.py
prospector/formatters/yaml.py
prospector/message.py
prospector/pathutils.py
prospector/postfilter.py
prospector/profiles/__init__.py
prospector/profiles/profile.py
prospector/profiles/profiles/default.yaml
prospector/profiles/profiles/doc_warnings.yaml
prospector/profiles/profiles/flake8.yaml
prospector/profiles/profiles/full_pep8.yaml
prospector/profiles/profiles/member_warnings.yaml
prospector/profiles/profiles/no_doc_warnings.yaml
prospector/profiles/profiles/no_member_warnings.yaml
prospector/profiles/profiles/no_pep8.yaml
prospector/profiles/profiles/no_test_warnings.yaml
prospector/profiles/profiles/strictness_high.yaml
prospector/profiles/profiles/strictness_low.yaml
prospector/profiles/profiles/strictness_medium.yaml
prospector/profiles/profiles/strictness_none.yaml
prospector/profiles/profiles/strictness_veryhigh.yaml
prospector/profiles/profiles/strictness_verylow.yaml
prospector/profiles/profiles/test_warnings.yaml
prospector/run.py
prospector/suppression.py
prospector/tools/__init__.py
prospector/tools/base.py
prospector/tools/dodgy/__init__.py
prospector/tools/frosted/__init__.py
prospector/tools/mccabe/__init__.py
prospector/tools/mypy/__init__.py
prospector/tools/pep257/__init__.py
prospector/tools/pep8/__init__.py
prospector/tools/profile_validator/__init__.py
prospector/tools/pyflakes/__init__.py
prospector/tools/pylint/__init__.py
prospector/tools/pylint/collector.py
prospector/tools/pylint/indent_checker.py
prospector/tools/pylint/linter.py
prospector/tools/pyroma/__init__.py
prospector/tools/utils.py
prospector/tools/vulture/__init__.py
setup.py
tests/__init__.py
tests/config/__init__.py
tests/config/test_datatype.py
tests/finder/__init__.py
tests/finder/test_file_finder.py
tests/finder/testdata/test1/package1/__init__.py
tests/finder/testdata/test1/somedir/package2/__init__.py
tests/finder/testdata/test2/module.py
tests/finder/testdata/test2/package/__init__.py
tests/finder/testdata/test2/package/subpackage/__init__.py
tests/finder/testdata/test3/package/a/__init__.py
tests/finder/testdata/test3/package/b/__init__.py
tests/finder/testdata/test3/package/c/__init__.py
tests/finder/testdata/test3/package/d/__init__.py
tests/finder/testdata/venvs/is_a_venv/Scripts/README.txt
tests/finder/testdata/venvs/is_a_venv/bin/README.txt
tests/finder/testdata/venvs/is_a_venv/include/README.txt
tests/finder/testdata/venvs/is_a_venv/lib/README.txt
Please move or remove them before you switch branches.
Aborting
Check the log at C:\Users\Manuel\.cache\pre-commit\pre-commit.log
What do I have to do in order to fix this?. Thank you in advance.