Mauricio Alvarez Leon

Results 139 comments of Mauricio Alvarez Leon

This could potentially be a good alternative. I'll look more into it later. https://github.com/uncrustify/uncrustify

uncrustify looks to be a lot better for dealing with simple checks. This is what I'm using for the 2 space indent in the config file. Tested with `safety_mazda.h` with...

last step is to get it running in a hook. the check can be done by just adding a --check flag. this shows what is outputted on a pass/fail: ```...

Wasn't happy with the output since this would fail at the first file and also not show how to fix it. Found a user that worked on a more elaborate...

> https://github.com/pocc/pre-commit-hooks?tab=readme-ov-file#example-usage awesome find, I didn't come across this when first researching uncrustify hooks. How it looks now after a `pre-commit run` when style doesn't match: ``` └─(15:10:05 on setup-clang-format...

from latest commit: ``` ┌─(~/Dev/panda-1)────────────────────────────────────────────────────────────────────────────────────────(mau@mau-JKDT676NCP:s041)─┐ └─(15:12:33 on setup-clang-format ✚)──> git commit -m "add uncrustify into pre-commit-config.yaml file" 1 ↵ ──(Fri,Apr05)─┘ Running hook: pre-commit-uncrustify Files in this commit comply with the...

it's failing because of this non-zero default values: https://github.com/uncrustify/uncrustify/blob/787adc57ad95b3961581f2287dcbdff7058b746d/src/options.cpp#L2176-L2220 I'll set them to zero/false and give it another run.

I've tried different configurations but run into a blocker with `&`. specifically: *Before uncrustify* ``` ((((TypeExtField)

This is odd since I don't get anything like this when running locally. I'll look more into this. ``` precommit_format.cfg:3: unknown symbol 'pp_space_after' precommit_format.cfg:5: unknown symbol 'align_nl_cont_spaces' Option: at precommit_format.cfg:7:...

``` precommit_format.cfg:3: unknown symbol 'pp_space_after' precommit_format.cfg:5: unknown symbol 'align_nl_cont_spaces' Option: at precommit_format.cfg:7: Expected one of 'true', 'false'for 'indent_shift'; got '1' precommit_format.cfg:11: unknown symbol 'sp_between_ptr_ref' Option: at precommit_format.cfg:12: Expected one of...