Closed EmreTech closed 3 years ago
Can you run clang-format on this please? Using the script in the repo
(also thanks for the PR!)
Sure!
Okay, why is there a file named -
after running that clang-format script?
I don't know what did you run exactly?
Le 24 mars 2021 22:19:31 EmreTech @.***> a écrit :
Okay, why is there a file named - after running that clang-format script? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I ran ./scripts/format.sh --fix
and it said this after the patching file *insert file here*
:
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file -
You succeeded to keep everything but the important part of the error message, can I see it entirely?
Le 24 mars 2021 22:22:20 EmreTech @.***> a écrit :
I ran ./scripts/format.sh --fix and it said this after the patching file insert file here: Hunk #1 FAILED at 19. 1 out of 1 hunk FAILED -- saving rejects to file -
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm not sure how you would run into conflicts with yourself (essentially the script is generating a patch file of the format changes, and failing to apply it) but you may just have edited the file while the script was running (you or your IDE). Also the script should output the rejects to stdout (not to a file named "-")
Here's the full output from the command:
patching file library/include/borealis/core/font.hpp
patching file library/include/borealis/core/util.hpp
patching file library/include/borealis/core/input.hpp
patching file library/include/borealis/views/rectangle.hpp
patching file library/include/borealis/views/button.hpp
patching file library/lib/platforms/switch/switch_audio.cpp
patching file library/lib/core/util.cpp
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file -
patching file library/lib/views/button.cpp
patching file library/lib/views/image.cpp
patching file library/lib/views/label.cpp
I'm not sure how you would run into conflicts with yourself (essentially the script is generating a patch file of the format changes, and failing to apply it) but you may just have edited the file while the script was running (you or your IDE)
That could be the case, I think I might've forgotten to close the file in VS Code
Yeah I encountered the same issue today while working on the library. util.cpp has different line endings (CRLF) and the patch fails. Open it in vscode and convert the line endings to LF then run clang format again
Le 24 mars 2021 22:27:49 EmreTech @.***> a écrit :
Here's the full output from the command: patching file library/include/borealis/core/font.hpp patching file library/include/borealis/core/util.hpp patching file library/include/borealis/core/input.hpp patching file library/include/borealis/views/rectangle.hpp patching file library/include/borealis/views/button.hpp patching file library/lib/platforms/switch/switch_audio.cpp patching file library/lib/core/util.cpp Hunk #1 FAILED at 19. 1 out of 1 hunk FAILED -- saving rejects to file - patching file library/lib/views/button.cpp patching file library/lib/views/image.cpp patching file library/lib/views/label.cpp
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Alright, that actually worked. Thanks!
Also the script should output the rejects to stdout (not to a file named "-")
Yeah, that doesn't seem normal... I downloaded clang-format-8 from brew, maybe it's slightly broken?
Originally a fix for #155
This Pull Request aims to fix some small minor warnings that can cause a lot of scrolling if the build failed.