-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Description
Inside the CI env FILE_ENV="./ci/test/00_setup_env_native_tidy.sh"
clang-tidy only checks our cpp files and not our header files?
Currently it passes on master, however if manually invoked on a header file, it will fail:
# clang-tidy-15 -p=/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet /bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.cpp && echo $?
543 warnings generated.
1086 warnings generated.
0
# clang-tidy-15 -p=/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet /bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h && echo $?
408 warnings generated.
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:192:19: error: std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
: m_names{std::move(name)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:193:18: error: std::move of the const variable 'type' of the trivially-copyable type 'const RPCArg::Type' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
m_type{std::move(type)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:194:22: error: std::move of the const variable 'fallback' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_fallback{std::move(fallback)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:195:25: error: std::move of the const variable 'description' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_description{std::move(description)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:208:19: error: std::move of the const variable 'name' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
: m_names{std::move(name)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:209:18: error: std::move of the const variable 'type' of the trivially-copyable type 'const RPCArg::Type' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
m_type{std::move(type)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:210:19: error: std::move of the const variable 'inner' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_inner{std::move(inner)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:211:22: error: std::move of the const variable 'fallback' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_fallback{std::move(fallback)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:212:25: error: std::move of the const variable 'description' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_description{std::move(description)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:275:18: error: std::move of the const variable 'type' of the trivially-copyable type 'const RPCResult::Type' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: m_type{std::move(type)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:276:22: error: std::move of the const variable 'm_key_name' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_key_name{std::move(m_key_name)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:277:19: error: std::move of the const variable 'inner' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_inner{std::move(inner)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:280:25: error: std::move of the const variable 'description' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_description{std::move(description)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:281:18: error: std::move of the const variable 'cond' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_cond{std::move(cond)}
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:302:18: error: std::move of the const variable 'type' of the trivially-copyable type 'const RPCResult::Type' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: m_type{std::move(type)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:303:22: error: std::move of the const variable 'm_key_name' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_key_name{std::move(m_key_name)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:304:19: error: std::move of the const variable 'inner' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_inner{std::move(inner)},
^~~~~~~~~~ ~
/bitcoin-core/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/util.h:307:25: error: std::move of the const variable 'description' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg,-warnings-as-errors]
m_description{std::move(description)},
^~~~~~~~~~ ~