Remove clang-tidy
This commit is contained in:
parent
5c3df2571e
commit
799e7a7705
@ -1,6 +0,0 @@
|
||||
---
|
||||
Checks: '-*,clang-diagnostic-*,clang-analyzer-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-cppcoreguidelines-macro-usage,-modernize-use-trailing-return-type,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-avoid-c-arrays,-modernize-avoid-c-arrays,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-else-after-return,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cert-dcl50-cpp,-cppcoreguidelines-init-variables,-readability-implicit-bool-conversion,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-type-member-init,-readability-isolate-declaration,-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-cstyle-cast,-readability-named-parameter,-cppcoreguidelines-avoid-goto,-readability-uppercase-literal-suffix,-performance-avoid-endl,-bugprone-easily-swappable-parameters,-cppcoreguidelines-non-private-member-variables-in-classes'
|
||||
WarningsAsErrors: '*'
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: none
|
||||
18
.github/workflows/lint.yml
vendored
18
.github/workflows/lint.yml
vendored
@ -1,18 +0,0 @@
|
||||
name: lint
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: dependencies
|
||||
run: |
|
||||
sudo apt install clang-tidy
|
||||
- name: clang-tidy
|
||||
run: |
|
||||
chmod +x lint.sh
|
||||
./lint.sh -DCPPTRACE_BACKTRACE_PATH=\"/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h\"
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
[](https://github.com/jeremy-rifkin/cpptrace/actions/workflows/build.yml)
|
||||
[](https://github.com/jeremy-rifkin/cpptrace/actions/workflows/test.yml)
|
||||
[](https://github.com/jeremy-rifkin/cpptrace/actions/workflows/lint.yml)
|
||||
<br/>
|
||||
[](https://github.com/jeremy-rifkin/cpptrace/actions/workflows/performance-tests.yml)
|
||||
[](https://github.com/jeremy-rifkin/cpptrace/actions/workflows/cmake-integration.yml)
|
||||
<br/>
|
||||
|
||||
14
lint.sh
14
lint.sh
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
status=0
|
||||
while read f
|
||||
do
|
||||
echo checking $f
|
||||
flags="-DCPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE -DCPPTRACE_GET_SYMBOLS_WITH_LIBDL -DCPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE -DCPPTRACE_GET_SYMBOLS_WITH_NOTHING -DCPPTRACE_UNWIND_WITH_EXECINFO -DCPPTRACE_UNWIND_WITH_UNWIND -DCPPTRACE_UNWIND_WITH_NOTHING -DCPPTRACE_DEMANGLE_WITH_CXXABI -DCPPTRACE_DEMANGLE_WITH_NOTHING -DCPPTRACE_ADDR2LINE_SEARCH_SYSTEM_PATH"
|
||||
clang-tidy $f -- -std=c++11 -Iinclude $@ $flags
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
status=1
|
||||
fi
|
||||
done <<< $(find include src -name "*.hpp" -o -name "*.cpp" -not -path "test/speedtest.cpp" -not -path "src/full/full_trace_with_stacktrace.cpp")
|
||||
exit $status
|
||||
@ -19,7 +19,6 @@ namespace detail {
|
||||
// we'll just quietly return the mangled name
|
||||
if(demangled) {
|
||||
std::string str = demangled;
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-no-malloc)
|
||||
std::free(demangled);
|
||||
return str;
|
||||
} else {
|
||||
|
||||
@ -23,10 +23,8 @@ namespace detail {
|
||||
|
||||
// Lightweight std::source_location.
|
||||
struct source_location {
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
|
||||
const char* const file;
|
||||
//const char* const function; // disabled for now due to static constexpr restrictions
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
|
||||
const int line;
|
||||
constexpr source_location(
|
||||
//const char* _function /*= __builtin_FUNCTION()*/,
|
||||
|
||||
@ -142,7 +142,6 @@ namespace detail {
|
||||
#endif
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(misc-no-recursion)
|
||||
inline constexpr unsigned n_digits(unsigned value) {
|
||||
return value < 10 ? 1 : 1 + n_digits(value / 10);
|
||||
}
|
||||
@ -177,8 +176,6 @@ namespace detail {
|
||||
};
|
||||
|
||||
public:
|
||||
// clang-tidy false positive
|
||||
// NOLINTNEXTLINE(modernize-use-equals-default)
|
||||
optional() noexcept {}
|
||||
|
||||
optional(nullopt_t) noexcept {}
|
||||
@ -223,8 +220,6 @@ namespace detail {
|
||||
typename U = T,
|
||||
typename std::enable_if<!std::is_same<typename std::decay<U>::type, optional<T>>::value, int>::type = 0
|
||||
>
|
||||
// clang-tidy false positive
|
||||
// NOLINTNEXTLINE(bugprone-forwarding-reference-overload)
|
||||
optional(U&& value) : holds_value(true) {
|
||||
new (static_cast<void*>(std::addressof(uvalue))) T(std::forward<U>(value));
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
|
||||
#if IS_LINUX || IS_APPLE
|
||||
#include <unistd.h>
|
||||
// NOLINTNEXTLINE(misc-include-cleaner)
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
@ -36,7 +35,6 @@ namespace addr2line {
|
||||
checked = true;
|
||||
// Detects if addr2line exists by trying to invoke addr2line --help
|
||||
constexpr int magic = 42;
|
||||
// NOLINTNEXTLINE(misc-include-cleaner)
|
||||
const pid_t pid = fork();
|
||||
if(pid == -1) { return false; }
|
||||
if(pid == 0) { // child
|
||||
@ -58,7 +56,6 @@ namespace addr2line {
|
||||
}
|
||||
int status;
|
||||
waitpid(pid, &status, 0);
|
||||
// NOLINTNEXTLINE(misc-include-cleaner)
|
||||
has_addr2line = WEXITSTATUS(status) == 0;
|
||||
}
|
||||
return has_addr2line;
|
||||
@ -80,7 +77,6 @@ namespace addr2line {
|
||||
pipe_t input_pipe;
|
||||
CPPTRACE_VERIFY(pipe(output_pipe.data) == 0);
|
||||
CPPTRACE_VERIFY(pipe(input_pipe.data) == 0);
|
||||
// NOLINTNEXTLINE(misc-include-cleaner)
|
||||
const pid_t pid = fork();
|
||||
if(pid == -1) { return ""; } // error? TODO: Diagnostic
|
||||
if(pid == 0) { // child
|
||||
@ -190,7 +186,6 @@ namespace addr2line {
|
||||
}
|
||||
#endif
|
||||
|
||||
// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
|
||||
void update_trace(const std::string& line, size_t entry_index, const collated_vec& entries_vec) {
|
||||
#if !IS_APPLE
|
||||
// Result will be of the form "<symbol> at path:line"
|
||||
@ -270,7 +265,6 @@ namespace addr2line {
|
||||
#endif
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
|
||||
std::vector<stacktrace_frame> resolve_frames(const std::vector<object_frame>& frames) {
|
||||
// TODO: Refactor better
|
||||
std::vector<stacktrace_frame> trace(frames.size());
|
||||
|
||||
@ -47,7 +47,6 @@ namespace libbacktrace {
|
||||
static std::mutex mutex;
|
||||
const std::lock_guard<std::mutex> lock(mutex);
|
||||
// backtrace_create_state must be called only one time per program
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
static backtrace_state* state = nullptr;
|
||||
static bool called = false;
|
||||
if(!called) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user