e95e921ca1
In #4683, tannewt noticed that uncrustify was not running on some file in common-hal. I investigated and found that it was not being run on a bunch of paths. Rather than make incremental changes, I rewrote list_files to work bsaed on regular expressions; these regular expressions are created from the same git-style glob patterns. I spot-checked some specific filenames after this change, and all looks good: ``` $ python3 tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup extmod/virtpin.c ports/raspberrypi/background.h ports/raspberrypi/common-hal/pulseio/PulseIn.c black --fast --line-length=99 -v tests/thread/thread_exit1.py ``` recursiveloop and int_small are excluded, while PulseIn, virtpin, and background are included. Testing running from a subdirectory (not _specifically_ supported though): ``` (cd ports && python3 ../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c) ../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup ../extmod/virtpin.c raspberrypi/common-hal/pulseio/PulseIn. ``` As a side-effect, a bunch more files are re-formatted now. :-P |
||
---|---|---|
.. | ||
adabot@393c275671 | ||
bitmap_font@62dd78abdd | ||
fonts | ||
huffman@27b1bba761 | ||
python-semver@2001c62d1a | ||
Tecate-bitmap-fonts@6f52a7ca08 | ||
uf2@adbb8c7260 | ||
usb_descriptor@2eaa6114b2 | ||
.gitattributes | ||
.gitignore | ||
analyze_heap_dump.py | ||
analyze_mpy.py | ||
bootstrap_upip.sh | ||
build_board_info.py | ||
build_memory_info.py | ||
build_release_files.py | ||
build-stm-latest.sh | ||
cc1 | ||
chart_code_size.py | ||
check_code_size.sh | ||
check_translations.py | ||
ci_check_duplicate_usb_vid_pid.py | ||
ci_new_boards_check.py | ||
codeformat.py | ||
codestats.sh | ||
convert_release_notes.py | ||
cpboard.py | ||
dfu.py | ||
extract_pyi.py | ||
file2h.py | ||
fixup_translations.py | ||
gc_activity_between_collects.py | ||
gc_activity.html | ||
gc_activity.md | ||
gc_activity.py | ||
gen_display_resources.py | ||
gen_ld_files.py | ||
gen_nvm_devices.py | ||
gen_usb_descriptor.py | ||
gen-changelog.sh | ||
gendoc.py | ||
git-checkout-latest-tag.sh | ||
hid_report_descriptors.py | ||
insert-usb-ids.py | ||
join_bins.py | ||
make-frozen.py | ||
mpconfig_category_reader.py | ||
mpy_bin2res.py | ||
mpy_cross_all.py | ||
mpy-tool.py | ||
output_gc_until_repl.txt | ||
preprocess_frozen_modules.py | ||
print_status.py | ||
pyboard.py | ||
pydfu.py | ||
tinytest-codegen.py | ||
uncrustify.cfg | ||
upip_utarfile.py | ||
upip.py |