Llvm-header-guard error dose not show

Hello,

It seems that the [llvm-header-guard] error is not displayed on Codacy website.

With the clang-tidy output :

#ifndef CHESS_SRC_TEST_COV_TESTT_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
        _HOME_RUNNER_WORK_CHESS_CHESS_SRC_TEST_COV_TEST_HH
src/test_cov/test_tmp.cc:5:15: error: statement should be inside braces [google-readability-braces-around-statements,-warnings-as-errors]
    if (x > 0)
              ^
               {
src/test_cov/test_tmp.cc:5:15: error: statement should be inside braces [hicpp-braces-around-statements,-warnings-as-errors]
    if (x > 0)
              ^
               {
src/test_cov/test_tmp.cc:5:15: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
    if (x > 0)
              ^
               {
src/test_cov/test_tmp.cc:7:15: error: statement should be inside braces [google-readability-braces-around-statements,-warnings-as-errors]
    if (x < 0)
              ^
               {
src/test_cov/test_tmp.cc:7:15: error: statement should be inside braces [hicpp-braces-around-statements,-warnings-as-errors]
    if (x < 0)
              ^
               {
src/test_cov/test_tmp.cc:7:15: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
    if (x < 0)
              ^
               {
src/test_cov/test_tmp.hh:1:9: error: header guard does not follow preferred style [llvm-header-guard,-warnings-as-errors]
#ifndef CHESS_SRC_TEST_COV_TEST_TMP_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        _HOME_RUNNER_WORK_CHESS_CHESS_SRC_TEST_COV_TEST_TMP_HH

Only the following errors are displayed :

Do you have any idea about this issue?

It seems that issue is reported on a .hh file, and on Codacy, that is not an extension that we are associating with CPP. I can create an internal ticket to consider adding .hh as a valid extension for CPP.

In the meanwhile, you can check the docs on how to configure file extensions and add .hh as a valid CPP extension on your repository settings.

1 Like

Hey,

That was the problem, I did add the .hh in the files extensions, but i did not separate them using ,.

About the internal ticket, I’ll let you choose if it’s interesting enough to create it. Personally, I use hh, cc and hxx files because that’s how i learn it in school, and I have no clue about it being good or not.

Anyway, thanks for the help, it’s working now :slight_smile:

1 Like