Skip to content

Commit

Permalink
[clang-format] Add Verilog suffixes to the scripts
Browse files Browse the repository at this point in the history
I decided not to wait for D149088 because it was taking a long time.

The capture group in the regexp was changed to non-capturing.  It
doesn't need to be captured.

Reviewed By: HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D154467
  • Loading branch information
sstwcw committed Aug 24, 2023
1 parent b65ce4e commit 825cec2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/tools/clang-format/clang-format-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def main():
parser.add_argument(
"-iregex",
metavar="PATTERN",
default=r".*\.(cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp|hxx"
r"|m|mm|inc|js|ts|proto|protodevel|java|cs|json)",
default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp"
r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)",
help="custom pattern selecting file paths to reformat "
"(case insensitive, overridden by -regex)",
)
Expand Down
1 change: 1 addition & 0 deletions clang/tools/clang-format/git-clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def main():
'ts', # TypeScript
'cs', # C Sharp
'json', # Json
'sv', 'svh', 'v', 'vh', # Verilog
])

p = argparse.ArgumentParser(
Expand Down

0 comments on commit 825cec2

Please sign in to comment.