Seeing as this project is already diverging from pre-commit on several foundational levels, I want to propose an addition that is no longer planned for the OG project: regex lists. This functionality was originally considered for the pre-commit project1, but was ultimately shelved for concerns of mixed syntax. Seeing how far tools like intellisense and schema validation has come in that time, as well as list support already being integrated for the prek-exclusive glob patterns, I think it warrants revisiting.
This would most prominently replace verbose regex, which often doesn't play nice with version control:
exclude = '''(?x)(
^thirdparty/|
-(dll|dylib|so)_wrap\.[ch]$|
^platform/android/java/editor/src/main/java/com/android/|
^platform/android/java/lib/src/main/java/com/google/
)'''
The above syntax could instead be implemented as:
exclude = [
"^thirdparty/",
'-(dll|dylib|so)_wrap\.[ch]$',
"^platform/android/java/editor/src/main/java/com/android/",
"^platform/android/java/lib/src/main/java/com/google/",
]
Seeing as this project is already diverging from pre-commit on several foundational levels, I want to propose an addition that is no longer planned for the OG project: regex lists. This functionality was originally considered for the pre-commit project1, but was ultimately shelved for concerns of mixed syntax. Seeing how far tools like intellisense and schema validation has come in that time, as well as list support already being integrated for the prek-exclusive glob patterns, I think it warrants revisiting.
This would most prominently replace verbose regex, which often doesn't play nice with version control:
The above syntax could instead be implemented as:
Footnotes
Support files / exclude as both regex / list of regexes pre-commit/pre-commit#149 ↩