Skip to content

Commit

Permalink
[UPDATE] Remove default clang tidy configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
janstrohbeck committed Mar 29, 2019
1 parent bad6eba commit 94bf67a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ function(create_git_hook)
# clang-format style
GCF_CHECK_OPTION_OR_DEFAULT("CLANG_FORMAT_STYLE" "file")
# Checks executed by clang-tidy
GCF_CHECK_OPTION_OR_DEFAULT("CLANG_TIDY_CHECKS"
"readability-*,bugprone-*,modernize-*,google-*")
GCF_CHECK_OPTION_OR_DEFAULT("CLANG_TIDY_CHECKS" "")
# Comma-separated list of tools to run
GCF_CHECK_OPTION_OR_DEFAULT("MODES" "format,lint")
# Abort commit if files would be formatted
Expand Down
6 changes: 4 additions & 2 deletions git-cmake-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def callLinter(linter_name, project, files):
sys.exit(1)
linter_args = [project[linter_name]]
if linter_name == 'clang-tidy':
linter_args.extend(['-checks=' + project["clang_tidy_checks"], '-p', project["builddir"]])
if project["clang_tidy_checks"]is not None:
linter_args.extend(['-checks=' + project["clang_tidy_checks"]])
linter_args.extend(['-p', project["builddir"]])
if args.fix:
linter_args.extend(['--fix', '-format-style', project["clang_format_style"]])
linter_args.extend(files)
Expand Down Expand Up @@ -110,7 +112,7 @@ def is_subdir(path, directory):
path = normpath(normcase(path))
directory = normpath(normcase(directory))
if len(path) > len(directory):
sep = os.path.sep.encode('ascii') if isinstance(directory, bytes) else sep
sep = os.path.sep.encode('ascii') if isinstance(directory, bytes) else os.path.sep
if path.startswith(directory.rstrip(sep) + sep):
return True
return False
Expand Down

0 comments on commit 94bf67a

Please sign in to comment.