Skip to content

WIP: fix pre-commit-clang-format not working on Windows - #390

Draft
Coder-Manan wants to merge 5 commits into
metacall:developfrom
Coder-Manan:develop
Draft

Coder-Manan wants to merge 5 commits into
metacall:developfrom
Coder-Manan:develop

Conversation

@Coder-Manan

Copy link
Copy Markdown

Description

The pre commit hook which checks for clang version installed doesn't work on Windows OS as expected. This PR aims at fixing that.

Fixes #370

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests/screenshots (if any) that prove my fix is effective or that my feature works.
  • I have tested the tests implicated (if any) by my own code and they pass (make test or ctest -VV -R <test-name>).
  • If my change is significant or breaking, I have passed all tests with ./docker-compose.sh test &> output and attached the output.
  • I have tested my code with OPTION_BUILD_SANITIZER or ./docker-compose.sh test-sanitizer &> output and OPTION_TEST_MEMORYCHECK.
  • I have tested my code with OPTION_BUILD_THREAD_SANITIZER or ./docker-compose.sh test-thread-sanitizer &> output.
  • I have tested with Helgrind in case my code works with threading.
  • I have run make clang-format in order to format my code and my code follows the style guidelines.

If you are unclear about any of the above checks, have a look at our documentation here.

@Coder-Manan

Copy link
Copy Markdown
Author

This is a WIP PR made to track the work done for this issue. Please don't merge this yet

@Coder-Manan

Copy link
Copy Markdown
Author

I will resume work after 4 march, since I have my college exams till then

@viferga
viferga marked this pull request as draft March 1, 2023 16:06
@viferga

viferga commented Mar 1, 2023

Copy link
Copy Markdown
Member

Please set the PR as draft when it is WIP.

@pkspyder007

Copy link
Copy Markdown
Contributor

@Coder-Manan any updates on this one?

@Coder-Manan

Copy link
Copy Markdown
Author

I am currently learning about both the scripts, will work after that.

@viferga

viferga commented Mar 27, 2023

Copy link
Copy Markdown
Member

It would be interesting to have it in a single script: https://codegolf.stackexchange.com/a/66700

@Coder-Manan

Copy link
Copy Markdown
Author

I have started porting the script to powershell, piece by piece. I will be highly obliged if you review it and tell me any corrections which may be needed

@Coder-Manan

Coder-Manan commented Apr 2, 2023 •

Copy link
Copy Markdown
Author

While porting the script I found that we may need to port githooks\canonicalize_filename.sh as well(because it is being run in the clang-format githook). I'll do that in a separate PR if needed

@viferga

viferga commented Sep 13, 2023 •

Copy link
Copy Markdown
Member

I have created a new subfolder for implementing this on windows only. Now it is cross-platform, but it lacks windows implementation, it won't give errors with windows anymore: 69fad4b

@Coder-Manan If you are still interested you can continue implementing it in this folder: https://github.com/metacall/core/tree/develop/githooks/win32

Feel free to implement everything in the same PR.

This branch has not been deployed

No deployments
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.

pre-commit-clang-format not working on windows

3 participants