# clang-tidy checks for this repo's competitive-programming C++. # # Kept byte-for-byte identical in two places, and a test in # site/internal/runner checks that they match: # .clang-tidy (repo root) for editors and clangd # site/internal/runner/clang-tidy.yaml embedded in the solve page's linter # # bugprone and performance catch real mistakes (int overflow before # widening, copies in hot loops, chained comparisons) without opinions on # style. Turned off are the checks that fire on the template itself or on # idioms that are normal in contest code: # macro-parentheses the template's F(i, L, R), takeI(n) etc. # easily-swappable-... every f(int a, int b) # narrowing-conversions int i = v.size() and friends, everywhere # switch-missing-default switches over a char read from input # avoid-endl interactive problems need the flush # enum-size an enum's base type never matters here # Compiler errors are left to g++, which the linter also runs. Checks: >- -*, bugprone-*, performance-*, readability-misleading-indentation, readability-redundant-*, -bugprone-easily-swappable-parameters, -bugprone-narrowing-conversions, -bugprone-macro-parentheses, -bugprone-switch-missing-default-case, -performance-avoid-endl, -performance-enum-size