Skip to content

Commit fb10d15

Browse files
committed
tools/codeformat.py: Include more ports .c/.h files in formatting.
This adds a rule to cover all ports/**/*.[ch] file to the code formatting list. Explicit exclusions are also added for code in ports/ which is third party, or which requires a lot of reformatting. Signed-off-by: Damien George <damien@micropython.org>
1 parent 71a6454 commit fb10d15

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

tools/codeformat.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,37 @@
4444
"shared/timeutils/*.[ch]",
4545
"shared/runtime/*.[ch]",
4646
"mpy-cross/*.[ch]",
47-
"ports/*/*.[ch]",
48-
"ports/windows/msvc/**/*.[ch]",
49-
"ports/nrf/modules/nrf/*.[ch]",
47+
"ports/**/*.[ch]",
5048
"py/*.[ch]",
5149
# Python
5250
"drivers/**/*.py",
5351
"examples/**/*.py",
5452
"extmod/**/*.py",
5553
"ports/**/*.py",
56-
"ports/mimxrt/**/*.[ch]",
5754
"py/**/*.py",
5855
"tools/**/*.py",
5956
"tests/**/*.py",
6057
]
6158

6259
EXCLUSIONS = [
60+
# The cc3200 port is not fully formatted yet.
61+
"ports/cc3200/*/*.[ch]",
62+
# The nrf port is not fully formatted yet.
63+
"ports/nrf/boards/*.[ch]",
64+
"ports/nrf/device/*.[ch]",
65+
"ports/nrf/drivers/*.[ch]",
66+
"ports/nrf/modules/ble/*.[ch]",
67+
"ports/nrf/modules/board/*.[ch]",
68+
"ports/nrf/modules/machine/*.[ch]",
69+
"ports/nrf/modules/music/*.[ch]",
70+
"ports/nrf/modules/ubluepy/*.[ch]",
71+
"ports/nrf/modules/uos/*.[ch]",
72+
"ports/nrf/modules/utime/*.[ch]",
73+
# STM32 USB dev/host code is mostly 3rd party.
74+
"ports/stm32/usbdev/**/*.[ch]",
75+
"ports/stm32/usbhost/**/*.[ch]",
76+
# Teensy core code is 3rd party.
77+
"ports/teensy/core/*.[ch]",
6378
# STM32 build includes generated Python code.
6479
"ports/*/build*",
6580
# not real python files

0 commit comments

Comments
 (0)