circuitpython/tools
Jeff Epler e95e921ca1 codeformat: Fix filename matching
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
2021-04-30 10:48:08 -05:00
..
adabot@393c275671 Add support for adding release info into adafruit/circuitpython-org 2018-11-30 00:30:57 -08:00
bitmap_font@62dd78abdd Hook up the terminal based on the first display. 2019-01-31 11:42:14 -08:00
fonts Add an explicit SPDX license file for ter-u12n. 2020-07-06 19:15:41 +01:00
huffman@27b1bba761 Compress all translated strings with Huffman coding. 2018-08-16 17:40:57 -07:00
python-semver@2001c62d1a merge from 2.2.0 + fix up board defs 2018-01-02 21:25:41 -05:00
Tecate-bitmap-fonts@6f52a7ca08 Begin font parsing and packing for terminal 2019-01-31 11:42:13 -08:00
uf2@adbb8c7260 tools/uf2: take new upstream commits 2020-01-28 13:48:40 -06:00
usb_descriptor@2eaa6114b2 usb descriptors all set; rework of enabling for USB devices 2021-02-04 19:23:40 -05:00
.gitattributes micropython-upip: Mark as binary file and re-commit. 2015-06-06 23:09:23 +03:00
.gitignore tools: check-in errordeveloper/tinytest@eb2dbc858f 2014-05-08 01:41:21 +03:00
analyze_heap_dump.py run code formatting script 2021-03-15 19:27:36 +05:30
analyze_mpy.py run code formatting script 2021-03-15 19:27:36 +05:30
bootstrap_upip.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
build_board_info.py fix removing past releases from circuitpython.org 2021-04-12 23:37:41 +02:00
build_memory_info.py run code formatting script 2021-03-15 19:27:36 +05:30
build_release_files.py implement issue #4470 2021-03-24 23:39:47 +01:00
build-stm-latest.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
cc1 tools: Add C middle-processor to make builtin tables proper hash tables. 2015-12-31 00:24:33 +00:00
chart_code_size.py run code formatting script 2021-03-15 19:27:36 +05:30
check_code_size.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
check_translations.py Add license to some obvious files. 2020-07-06 19:16:25 +01:00
ci_check_duplicate_usb_vid_pid.py run code formatting script 2021-03-15 19:27:36 +05:30
ci_new_boards_check.py run code formatting script 2021-03-15 19:27:36 +05:30
codeformat.py codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
codestats.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
convert_release_notes.py run code formatting script 2021-03-15 19:27:36 +05:30
cpboard.py run code formatting script 2021-03-15 19:27:36 +05:30
dfu.py codeformat 2021-04-19 22:22:44 -07:00
extract_pyi.py run code formatting script 2021-03-15 19:27:36 +05:30
file2h.py codeformat 2021-04-19 22:22:44 -07:00
fixup_translations.py run code formatting script 2021-03-15 19:27:36 +05:30
gc_activity_between_collects.py run code formatting script 2021-03-15 19:27:36 +05:30
gc_activity.html Add heap analysis scripts based on GDB breakpoint logs. 2016-11-23 17:31:53 -08:00
gc_activity.md Update gc tracking instructions and gdb commands. 2020-02-11 17:05:43 -08:00
gc_activity.py run code formatting script 2021-03-15 19:27:36 +05:30
gen_display_resources.py run code formatting script 2021-03-15 19:27:36 +05:30
gen_ld_files.py run code formatting script 2021-03-15 19:27:36 +05:30
gen_nvm_devices.py Switch devices.h to nvm.toml data 2021-03-25 09:57:18 -07:00
gen_usb_descriptor.py Put mouse before gamepad due to MacOS being finicky 2021-04-04 21:48:54 -04:00
gen-changelog.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
gendoc.py codeformat 2021-04-19 22:22:44 -07:00
git-checkout-latest-tag.sh Add license to some obvious files. 2020-07-06 19:16:25 +01:00
hid_report_descriptors.py run code formatting script 2021-03-15 19:27:36 +05:30
insert-usb-ids.py codeformat 2021-04-19 22:22:44 -07:00
join_bins.py Add license to some obvious files. 2020-07-06 19:16:25 +01:00
make-frozen.py codeformat 2021-04-19 22:22:44 -07:00
mpconfig_category_reader.py run code formatting script 2021-03-15 19:27:36 +05:30
mpy_bin2res.py Add license to some obvious files. 2020-07-06 19:16:25 +01:00
mpy_cross_all.py codeformat 2021-04-19 22:22:44 -07:00
mpy-tool.py Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
output_gc_until_repl.txt Update gc tracking instructions and gdb commands. 2020-02-11 17:05:43 -08:00
preprocess_frozen_modules.py run code formatting script 2021-03-15 19:27:36 +05:30
print_status.py run code formatting script 2021-03-15 19:27:36 +05:30
pyboard.py Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
pydfu.py Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
tinytest-codegen.py Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
uncrustify.cfg update pre-commit 2021-03-15 19:26:29 +05:30
upip_utarfile.py codeformat 2021-04-19 22:22:44 -07:00
upip.py Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00