circuitpython/ports/atmel-samd/common-hal
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
..
_pew run code formatting script 2021-03-15 19:27:36 +05:30
analogio run code formatting script 2021-03-15 19:27:36 +05:30
audiobusio samd: Rename dma_{allocate,free} channel 2021-04-23 09:46:33 -05:00
audioio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
board Add license to some obvious files. 2020-07-06 19:16:25 +01:00
busio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
canio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
countio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
digitalio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
displayio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
frequencyio FrequencyIn: do not raise in interrupt handler 2020-12-22 18:54:42 -05:00
i2cperipheral Initial Changes 2021-03-09 10:48:33 -05:00
imagecapture codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
microcontroller update common_hal_reset_pin() 2020-12-28 20:04:00 +05:30
neopixel_write codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
nvm codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
os codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
ps2io codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
pulseio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
pwmio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
rgbmatrix codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
rotaryio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
rtc codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
sdioio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
supervisor codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
touchio codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00