ci: clang-tidy does not check header files? #26703

issue maflcko openend this issue on December 15, 2022
  1. maflcko commented at 8:48 am on December 15, 2022: member

    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:

     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.cpp && echo $?
     1543 warnings generated.
     21086 warnings generated.
     30
     4
     5# 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 $?
     6408 warnings generated.
     7/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]
     8        : m_names{std::move(name)},
     9                  ^~~~~~~~~~    ~
    10/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]
    11          m_type{std::move(type)},
    12                 ^~~~~~~~~~    ~
    13/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]
    14          m_fallback{std::move(fallback)},
    15                     ^~~~~~~~~~        ~
    16/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]
    17          m_description{std::move(description)},
    18                        ^~~~~~~~~~           ~
    19/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]
    20        : m_names{std::move(name)},
    21                  ^~~~~~~~~~    ~
    22/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]
    23          m_type{std::move(type)},
    24                 ^~~~~~~~~~    ~
    25/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]
    26          m_inner{std::move(inner)},
    27                  ^~~~~~~~~~     ~
    28/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]
    29          m_fallback{std::move(fallback)},
    30                     ^~~~~~~~~~        ~
    31/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]
    32          m_description{std::move(description)},
    33                        ^~~~~~~~~~           ~
    34/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]
    35        : m_type{std::move(type)},
    36                 ^~~~~~~~~~    ~
    37/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]
    38          m_key_name{std::move(m_key_name)},
    39                     ^~~~~~~~~~          ~
    40/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]
    41          m_inner{std::move(inner)},
    42                  ^~~~~~~~~~     ~
    43/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]
    44          m_description{std::move(description)},
    45                        ^~~~~~~~~~           ~
    46/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]
    47          m_cond{std::move(cond)}
    48                 ^~~~~~~~~~    ~
    49/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]
    50        : m_type{std::move(type)},
    51                 ^~~~~~~~~~    ~
    52/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]
    53          m_key_name{std::move(m_key_name)},
    54                     ^~~~~~~~~~          ~
    55/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]
    56          m_inner{std::move(inner)},
    57                  ^~~~~~~~~~     ~
    58/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]
    59          m_description{std::move(description)},
    60                        ^~~~~~~~~~           ~
    
  2. maflcko added the label Bug on Dec 15, 2022
  3. maflcko added the label Tests on Dec 15, 2022
  4. iscodand commented at 4:35 pm on December 15, 2022: none
    I can solve this
  5. maflcko closed this on Feb 1, 2023

  6. bitcoin locked this on Feb 1, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-29 07:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me