circuitpython/supervisor
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
..
messages Support internationalisation. 2018-08-07 14:58:57 -07:00
shared codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
stub [build] Allow USB to be set to 0 2021-04-23 11:13:34 -04:00
background_callback.h background_callback: Add gc collect callback 2020-07-17 08:36:26 -05:00
board.h Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
cpu.h Mark pointers in cpu registers as in use. 2018-07-03 05:45:50 -07:00
filesystem.h flush flash filesystem once a second 2019-03-20 12:21:36 -04:00
flash.h Redo RP2040 flash settings 2021-03-18 16:55:42 -07:00
flash_root_pointers.h Automatically count EXTERNAL_FLASH_DEVICES (mk2) 2021-03-07 12:51:47 -06:00
linker.h Redo RP2040 flash settings 2021-03-18 16:55:42 -07:00
memory.h run code formatting script 2021-03-15 19:27:36 +05:30
port.h run code formatting script 2021-03-15 19:27:36 +05:30
serial.h Merge remote-tracking branch 'upstream/main' into nrf52-sleep 2021-04-09 13:48:45 -04:00
spi_flash_api.h Fix devices include by splitting type from defines 2021-03-25 11:37:08 -07:00
supervisor.mk Merge pull request #4649 from tannewt/merge_1.11_2 2021-04-27 11:02:02 -07:00
usb.h make declatations of usb_msc_ routines conditional 2021-03-22 15:04:57 -05:00
workflow.h [build] Allow USB to be set to 0 2021-04-23 11:13:34 -04:00