https://github.com/stan-dev/stan
Raw File
Tip revision: 1c3c425607e31f945c8e979bab13e53308475790 authored by Stan BuildBot on 10 March 2022, 16:07:52 UTC
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Tip revision: 1c3c425
clang-tidy
# See full list of checks here
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
tidy_base_checks=*perf*,*modernize*,*misc*,*google*,*readability*,*optin*
modern_excludes=,-modernize-replace-random-shuffle,-modernize-use-override,-modernize-concat-nested-namespaces,-modernize-avoid-c-arrays
readability_excludes=,-readability-magic-numbers,-readability-convert-member-functions-to-static,-readability-inconsistent-declaration-parameter-name,-readability-function-size,-readability-named-parameter,-readability-container-size-empty,-readability-implicit-bool-conversion,-readability-else-after-return,-readability-container-size-empty
misc_excludes=,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-misc-unused-using-decls,-misc-definitions-in-headers,-misc-unconventional-assign-operator
google_excludes=,-google-runtime-references,-google-global-names-in-headers,-google-build-using-namespace,-google-runtime-int
things_we_should_look_at=,-google-readability-casting,-google-explicit-constructor,-modernize-use-using,-modernize-pass-by-value,-readability-implicit-bool-conversion,-readability-const-return-type,-readability-avoid-const-params-in-decls,-modernize-return-braced-init-list,-modernize-use-using
tidy_checks?= $(tidy_base_checks) $(modern_excludes) $(readability_excludes) $(misc_excludes) $(google_excludes) $(things_we_should_look_at)
files?= *
folder?= ./src/test/*
.PHONY: clang-tidy
clang-tidy:
		find $(folder) -path './src/test/*' -wholename '*$(files).cpp' -type f | xargs -I {} clang-tidy "{}" \
		 -checks='$(tidy_checks)' -format-style='file' -header-filter='./src/*' \
		 -- $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) $(INC_GTEST) $(CXXFLAGS_GTEST) $(CPPFLAGS)

.PHONY: clang-tidy-fix
clang-tidy-fix:
		find $(folder) -path './src/test/*' -wholename '*$(files).cpp' -type f | xargs -I {} clang-tidy "{}" \
		 -checks='$(tidy_checks)' -format-style='file' -header-filter='./src/*' \
		 -fix -export-fixes="./.clang-fixes.log" \
		 -- $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) $(INC_GTEST) $(CXXFLAGS_GTEST) $(CPPFLAGS)

.PHONY: clang-format
clang-format:
	 find src -name '*.hpp' -o -name '*.cpp' | xargs -n20 -P1 clang-format -i -style=file
back to top