diff --git a/.clang-tidy.in b/.clang-tidy.in index 1efa84d..5302cd8 100644 --- a/.clang-tidy.in +++ b/.clang-tidy.in @@ -36,6 +36,7 @@ Checks: "*,\ -fuchsia-default-arguments,\ -hicpp-vararg,\ -clang-analyzer-optin.cplusplus.VirtualCall,\ +-clang-analyzer-optin.core.EnumCastOutOfRange,\ -cppcoreguidelines-owning-memory,\ -hicpp-no-array-decay,\ -*-magic-numbers,\ @@ -70,6 +71,7 @@ Checks: "*,\ -google-readability-avoid-underscore-in-googletest-name,\ -readability-function-cognitive-complexity,\ -readability-avoid-const-params-in-decls,\ +-readability-avoid-return-with-void-value,\ -cppcoreguidelines-avoid-const-or-ref-data-members,\ -cppcoreguidelines-avoid-do-while,\ -altera-struct-pack-align,\ diff --git a/exe/backend/src/http_server.cc b/exe/backend/src/http_server.cc index b97c78c..4eb87cd 100644 --- a/exe/backend/src/http_server.cc +++ b/exe/backend/src/http_server.cc @@ -247,7 +247,6 @@ struct http_server::impl { cb(json_response(req, gj.string())); } - // NOLINTBEGIN(readability-avoid-return-with-void-value) void handle_request(web_server::http_req_t const& req, web_server::http_res_cb_t const& cb) { std::cout << "[" << req.method_string() << "] " << req.target() << '\n'; @@ -344,7 +343,6 @@ struct http_server::impl { } server_.run(); } - // NOLINTEND(readability-avoid-return-with-void-value) void stop() { server_.stop(); } diff --git a/src/extract.cc b/src/extract.cc index 532cd8a..7b8bde0 100644 --- a/src/extract.cc +++ b/src/extract.cc @@ -42,7 +42,6 @@ using namespace std::string_view_literals; namespace osr { -// NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) struct osm_restriction { bool valid() const { return from_ != osm_way_idx_t::invalid() && @@ -582,6 +581,5 @@ void extract(bool const with_platforms, lookup{w, out, cista::mmap::protection::WRITE}.build_rtree(); } -// NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) } // namespace osr diff --git a/src/lookup.cc b/src/lookup.cc index f733502..e49c097 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -8,7 +8,6 @@ namespace osr { -// NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) lookup::lookup(ways const& ways, std::filesystem::path p, cista::mmap::protection mode) @@ -75,6 +74,5 @@ hash_set lookup::find_elevators(geo::box const& b) const { }); return elevators; } -// NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) } // namespace osr diff --git a/src/ways.cc b/src/ways.cc index 7c0ebde..83608fe 100644 --- a/src/ways.cc +++ b/src/ways.cc @@ -4,7 +4,6 @@ namespace osr { -// NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) ways::ways(std::filesystem::path p, cista::mmap::protection const mode) : p_{std::move(p)}, mode_{mode}, @@ -162,6 +161,5 @@ cista::wrapped ways::routing::read( void ways::routing::write(std::filesystem::path const& p) const { cista::write(p / "routing.bin", *this); } -// NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) } // namespace osr \ No newline at end of file