Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre commit config #1

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

Pablo1107
Copy link
Contributor

Basado en este mensaje de Discord.

Sin esto el mensaje de CI que se muestra es el siguiente:

Run pre-commit/[email protected]
install pre-commit
/opt/hostedtoolcache/Python/3.12.7/x64/bin/pre-commit run --show-diff-on-failure --color=always --all-files
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-clang-format.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[WARNING] repo `[https://github.com/pre-commit/pre-commit-hooks`](https://github.com/pre-commit/pre-commit-hooks%60) uses deprecated stage names (commit, push) which will be removed in a future version.  Hint: often `pre-commit autoupdate --repo [https://github.com/pre-commit/pre-commit-hooks`](https://github.com/pre-commit/pre-commit-hooks%60) will fix this.  if it does not -- consider reporting an issue to that repo.
[INFO] Installing environment for https://github.com/pre-commit/mirrors-clang-format.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
clang-format.............................................................Failed
- hook id: clang-format
- exit code: 1

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repohdkejqza/py_env-python3.12/bin/clang-format", line 5, in <module>
    from clang_format import clang_format
  File "/home/runner/.cache/pre-commit/repohdkejqza/py_env-python3.12/lib/python3.12/site-packages/clang_format/__init__.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repohdkejqza/py_env-python3.12/bin/clang-format", line 5, in <module>
    from clang_format import clang_format
  File "/home/runner/.cache/pre-commit/repohdkejqza/py_env-python3.12/lib/python3.12/site-packages/clang_format/__init__.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Check for merge conflicts................................................Passed
Check for added large files..............................................Passed
Error: The process '/opt/hostedtoolcache/Python/3.12.7/x64/bin/pre-commit' failed with exit code 1

@Pablo1107 Pablo1107 force-pushed the fix-pre-commit-config branch from 157f0cf to eaa12e0 Compare October 28, 2024 00:20
@Pablo1107
Copy link
Contributor Author

Pablo1107 commented Oct 28, 2024

Igual a pesar de esto hay un problema de incompatibilidad entre pre-commit run --all-files y make format. Ambos no formatean con el mismo estilo y por lo tanto el pre-commit falla.

Los archivos que no se formatean iguales son:

  • sched/inc/lib.h
  • sched/inc/mmu.h
  • sched/inc/x86.h

@PatricioIribarneCatella PatricioIribarneCatella merged commit b9b921b into fisop:main Oct 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants