Skip to content

Commit 4023110

Browse files
committed
feat: add more clang-format filename extensions
Signed-off-by: Lucas Larson <[email protected]>
1 parent 75f58b5 commit 4023110

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

custom/aliases.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,11 @@ clang_format() {
496496
shift "$((OPTIND - 1))"
497497

498498
# eligible filename extensions:
499-
# https://github.com/llvm/llvm-project/blob/92df59c83d/clang/lib/Driver/Types.cpp#L295-L355
500-
# https://github.com/llvm/llvm-project/blob/81f0f5a0e5/clang/lib/Frontend/FrontendOptions.cpp#L17-L35
501-
# https://github.com/llvm/llvm-project/blob/e20a1e486e/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs#L41-L42
502-
# https://github.com/llvm/llvm-project/blob/cea81e95b0/clang/tools/clang-format/git-clang-format#L78-L90
503-
# https://github.com/llvm/llvm-project/blob/cea81e95b0/clang/tools/clang-format/clang-format-diff.py#L50-L51
499+
# https://github.com/llvm/llvm-project/blob/17c6c8da56/clang/lib/Driver/Types.cpp#L311-L377
500+
# https://github.com/llvm/llvm-project/blob/17c6c8da56/clang/lib/Frontend/FrontendOptions.cpp#L17-L38
501+
# https://github.com/llvm/llvm-project/blob/f22a8d1822/clang/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs#L41-L42
502+
# https://github.com/llvm/llvm-project/blob/db6ba82acc/clang/tools/clang-format/git-clang-format#L88-L128
503+
# https://github.com/llvm/llvm-project/blob/b17f1fd676/clang/tools/clang-format/clang-format-diff.py#L65-L66
504504

505505
command find -- . \
506506
-path '*/.git' -prune -o \
@@ -521,6 +521,7 @@ clang_format() {
521521
-name '*.[Aa][Dd][Aa]' -o \
522522
-name '*.[Aa][Dd][Bb]' -o \
523523
-name '*.[Aa][Dd][Ss]' -o \
524+
-name '*.[Aa][Ss][Cc][Ii][Ii][Pp][Bb]' -o \
524525
-name '*.[Aa][Ss][Mm]' -o \
525526
-name '*.[Aa][Ss][Tt]' -o \
526527
-name '*.[Bb][Cc]' -o \
@@ -533,8 +534,12 @@ clang_format() {
533534
-name '*.[Cc][Cc]' -o \
534535
-name '*.[Cc][Cc].[Ii][Nn]' -o \
535536
-name '*.[Cc][Cc][Mm]' -o \
537+
-name '*.[Cc][Ii][Rr]' -o \
538+
-name '*.[Cc][Jj][Ss]' -o \
536539
-name '*.[Cc][Ll]' -o \
537540
-name '*.[Cc][Ll][Cc][Pp][Pp]' -o \
541+
-name '*.[Cc][Ll][Ii]' -o \
542+
-name '*.[Cc][Ll][Ii][Ii]' -o \
538543
-name '*.[Cc][Pp]' -o \
539544
-name '*.[Cc][Pp][Pp]' -o \
540545
-name '*.[Cc][Pp][Pp].[Ii][Nn]' -o \
@@ -567,6 +572,7 @@ clang_format() {
567572
-name '*.[Hh][Hh]' -o \
568573
-name '*.[Hh][Hh].[Ii][Nn]' -o \
569574
-name '*.[Hh][Ii][Pp]' -o \
575+
-name '*.[Hh][Ii][Pp][Ii]' -o \
570576
-name '*.[Hh][Ll][Ss][Ll]' -o \
571577
-name '*.[Hh][Pp]' -o \
572578
-name '*.[Hh][Pp][Pp]' -o \
@@ -583,6 +589,7 @@ clang_format() {
583589
-name '*.[Ii][Nn][Ll]' -o \
584590
-name '*.[Ii][Nn][Oo]' -o \
585591
-name '*.[Ii][Pp][Pp]' -o \
592+
-name '*.[Ii][Pp][Yy][Nn][Bb]' -o \
586593
-name '*.[Ii][Xx][Xx]' -o \
587594
-name '*.[Jj][Aa][Vv]' -o \
588595
-name '*.[Jj][Aa][Vv][Aa]' -o \
@@ -594,25 +601,37 @@ clang_format() {
594601
-name '*.[Mm][Ee][Tt][Aa][Ll]' -o \
595602
-name '*.[Mm][Ii]' -o \
596603
-name '*.[Mm][Ii][Ii]' -o \
604+
-name '*.[Mm][Jj][Ss]' -o \
597605
-name '*.[Mm][Mm]' -o \
598606
-name '*.[Mm][Tt][Ss]' -o \
599607
-name '*.[Nn][Uu][Tt]' -o \
608+
-name '*.[Oo]' -o \
609+
-name '*.[Oo][Bb][Jj]' -o \
610+
-name '*.[Pp][Bb].[Tt][Xx][Tt]' -o \
600611
-name '*.[Pp][Cc][Cc]' -o \
601612
-name '*.[Pp][Cc][Hh]' -o \
602613
-name '*.[Pp][Cc][Mm]' -o \
603614
-name '*.[Pp][Ff][Oo]' -o \
604615
-name '*.[Pp][Gg][Cc]' -o \
616+
-name '*.[Pp][Rr][Oo][Tt][Oo]' -o \
605617
-name '*.[Pp][Rr][Oo][Tt][Oo][Dd][Ee][Vv][Ee][Ll]' -o \
606618
-name '*.[Rr][Ee]' -o \
607619
-name '*.[Ss]' -o \
620+
-name '*.[Ss][Vv]' -o \
621+
-name '*.[Ss][Vv][Hh]' -o \
608622
-name '*.[Tt][Cc][Cc]' -o \
609623
-name '*.[Tt][Dd]' -o \
624+
-name '*.[Tt][Ee][Xx][Tt][Pp][Bb]' -o \
625+
-name '*.[Tt][Ee][Xx][Tt][Pp][Rr][Oo][Tt][Oo]' -o \
610626
-name '*.[Tt][Ll][Hh]' -o \
611627
-name '*.[Tt][Ll][Ii]' -o \
612628
-name '*.[Tt][Pp][Pp]' -o \
613629
-name '*.[Tt][Ss]' -o \
614630
-name '*.[Tt][Ss][Xx]' -o \
631+
-name '*.[Tt][Xx][Tt][Pp][Bb]' -o \
615632
-name '*.[Tt][Xx][Xx]' -o \
633+
-name '*.[Vv]' -o \
634+
-name '*.[Vv][Hh]' -o \
616635
-name '*.[Xx][Bb][Mm]' -o \
617636
-name '*.[Xx][Pp][Mm]' \
618637
')' \

0 commit comments

Comments
 (0)