Skip to content

Conversation

@alfred2g
Copy link
Contributor

@alfred2g alfred2g commented Jul 1, 2020

Uncrustify kernel files

Description

Modifying the coding style in the kernel

Following the style from this file: https://github.com/FreeRTOS/FreeRTOS/blob/lts-development/tools/uncrustify.cfg

0 "FreeRTOS/Source/portable/WizC/PIC18/portmacro.h",
1 "FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.c",
2 "FreeRTOS/Source/portable/ARMv8M/non_secure/port.c",
3 "FreeRTOS/Source/portable/ThirdParty/XCC/Xtensa/xtensa_context.h",
4 "FreeRTOS/Source/portable/ThirdParty/XCC/Xtensa/port.c",
5 "FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/portmux_impl.inc.h",
6 "FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/port.c",
7 "FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h",
8 "FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/port.c",
9 "FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.c",
10 "FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/port.c",
11 "FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c",
12 "FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.c",
13 "FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/port.c",
14 "FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h",
15 "FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/port.c",
16 "FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.c",
17 "FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c",
18 "FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c",
19 "FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.c",
20 "FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/port.c",
21 "FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/ISR_Support.h",
22 "FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h",
23 "FreeRTOS/Source/portable/MPLAB/PIC18F/stdio.h",
24 "FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h",
25 "FreeRTOS/Source/portable/SDCC/Cygnal/port.c",

These files are omitted as uncrustify can't parse them correctly.

Testing with FreeRTOS uncrustify script

[FreeRTOS]$ python tools/git/hooks/src/pre_commit.py --uncrustify-all-files
PASS: ./FreeRTOS/Source/list.c (9075 bytes)
PASS: ./FreeRTOS/Source/timers.c (52457 bytes)
...
..
FreeRTOS]$ echo $?
0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bluewww
Copy link

bluewww commented Jul 2, 2020

Imo might as well add a .clang-format and say what the new guidelines are when doing this.

@alfred2g
Copy link
Contributor Author

alfred2g commented Jul 8, 2020

Hi @bluewww,
Sorry for the confusion, we are still working on the commit, the formatting will come with full documentation for our style guide.
We use uncrustify for our formatting
You can check out the formatting document at: https://github.com/FreeRTOS/FreeRTOS/blob/lts-development/tools/uncrustify.cfg
You are always welcome to submit an equivalent clang-format style file for it.

Alfred

@alfred2g alfred2g merged commit 587a83d into FreeRTOS:master Jul 8, 2020
laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this pull request Apr 18, 2024
* Project for integration tests

* relative paths in project files

* relative paths in project files-1

* relative paths in project files-2

* addressed comments

* addressed comments v2

Co-authored-by: Yuhui Zheng <[email protected]>
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.

4 participants