Skip to content

Commit

Permalink
Add lint for DCHECK in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Jul 14, 2024
1 parent fd6bf5a commit e3b9617
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/build-support/lint_cpp_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
_NULLPTR_REGEX = re.compile(r'.*\bnullptr\b.*')
_RETURN_NOT_OK_REGEX = re.compile(r'.*\sRETURN_NOT_OK.*')
_ASSIGN_OR_RAISE_REGEX = re.compile(r'.*\sASSIGN_OR_RAISE.*')
_DCHECK_REGEX = re.compile(r'.*\sDCHECK.*')


def _paths(paths):
Expand All @@ -54,13 +55,12 @@ def lint_file(path):
(lambda x: re.match(_RETURN_NOT_OK_REGEX, x),
'Use ARROW_RETURN_NOT_OK in header files', _paths('''\
arrow/status.h
test
arrow/util/hash.h
arrow/python/util''')),
(lambda x: re.match(_ASSIGN_OR_RAISE_REGEX, x),
'Use ARROW_ASSIGN_OR_RAISE in header files', _paths('''\
arrow/result_internal.h
test
'Use ARROW_ASSIGN_OR_RAISE in header files', []),
(lambda x: re.match(_DCHECK_REGEX, x),
'Use ARROW_DCHECK in header files', _paths('''\
arrow/logging.h
'''))

]
Expand Down

0 comments on commit e3b9617

Please sign in to comment.