circuitpython/ports/unix
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
..
coverage-frzmpy codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
coverage-frzstr codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
modules all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
.gitignore ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
Makefile Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
alloc.c codeformat 2021-04-19 22:22:44 -07:00
coverage.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
fatfs_port.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
fdfile.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
file.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
gccollect.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
input.c codeformat 2021-04-19 22:22:44 -07:00
input.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
main.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modffi.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modjni.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modmachine.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modos.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modtermios.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modtime.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
moduos_vfs.c codeformat 2021-04-19 22:22:44 -07:00
moduselect.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
modusocket.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
mpconfigport.h Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
mpconfigport.mk Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
mpconfigport_coverage.h Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
mpconfigport_fast.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
mpconfigport_freedos.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
mpconfigport_minimal.h Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
mpconfigport_nanbox.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
mphalport.h codeformat 2021-04-19 22:22:44 -07:00
mpthreadport.c Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
mpthreadport.h Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
qstrdefsport.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
unix_mphal.c codeformat 2021-04-19 22:22:44 -07:00