Skip to content

Commit

Permalink
clang-tidy improvements, recreate documentation (#83)
Browse files Browse the repository at this point in the history
* Lots of clang-tidy fixes

This enables a bunch of clang-tidy rules, and fixes nanobench.h wherever
possible, and otherwise disables the warning at that line.

* Updated documentation, adding missing files

Also update highlighting locations

* only use W4 warnings for MSVC
  • Loading branch information
martinus authored Feb 3, 2023
1 parent a7030c6 commit 41d6936
Show file tree
Hide file tree
Showing 57 changed files with 2,586 additions and 1,542 deletions.
61 changes: 32 additions & 29 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
---
Checks: "*,\
-google-runtime-int,\
-google-explicit-constructor,\
-hicpp-no-malloc,\
-hicpp-vararg,\
-hicpp-invalid-access-moved,\
-hicpp-no-array-decay,\
-llvm-header-guard,\
-readability-magic-numbers,\
-cppcoreguidelines-avoid-magic-numbers,\
-cppcoreguidelines-pro-bounds-constant-array-index,\
-cppcoreguidelines-pro-bounds-pointer-arithmetic,\
-cppcoreguidelines-pro-type-reinterpret-cast,\
-cppcoreguidelines-no-malloc,\
-cppcoreguidelines-owning-memory,\
-cppcoreguidelines-macro-usage,\
-cppcoreguidelines-pro-type-vararg,\
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
-fuchsia-overloaded-operator,\
-fuchsia-default-arguments,\
-fuchsia-multiple-inheritance,\
-fuchsia-default-arguments-calls,\
-fuchsia-trailing-return,\
-modernize-use-trailing-return-type,\
-misc-definitions-in-headers,\
-cert-err58-cpp,\
-clang-diagnostic-padded,\
-modernize-concat-nested-namespaces
WarningsAsErrors: "*"
Checks: '*,
-altera-id-dependent-backward-branch,
-altera-struct-pack-align,
-altera-unroll-loops,
-bugprone-easily-swappable-parameters,
-cert-err58-cpp,
-clang-diagnostic-padded,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-fuchsia-default-arguments-calls,
-fuchsia-default-arguments,
-fuchsia-multiple-inheritance,
-fuchsia-overloaded-operator,
-fuchsia-trailing-return,
-google-explicit-constructor,
-google-runtime-int,
-hicpp-invalid-access-moved,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-vararg,
-llvm-header-guard,
-llvmlibc-callee-namespace,
-llvmlibc-implementation-in-namespace,
-llvmlibc-restrict-system-libc-headers,
-misc-definitions-in-headers,
-modernize-concat-nested-namespaces,
-modernize-macro-to-enum,
-modernize-use-trailing-return-type,
-readability-identifier-length,
-readability-magic-numbers,
'
WarningsAsErrors: '*'
HeaderFilterRegex: 'nanobench\.h'
...

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Martin Leitner-Ankerl
Copyright (c) 2019-2023 Martin Leitner-Ankerl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion compile_commands.json
Loading

0 comments on commit 41d6936

Please sign in to comment.