Menu

External tool clang-tidy not read .clang-tidy configuration file

Zufu Liu
2019-06-27
2024-10-16
  • Zufu Liu

    Zufu Liu - 2019-06-27

    After clang-tidy been enabled in the project file.

        <tools>
            <tool>clang-tidy</tool>
        </tools>
    

    run the check, got many unwanted warnings, the .clang-tidy configuration file been ignored.

    I think Cppcheck should honor .clang-tidy configuration file if it found (maybe allow user to set the location of the file, and read it in), instead of passing all check options on command line, which override the options in configuration file.

    The file is YAML.
    https://clang.llvm.org/extra/clang-tidy/index.html

     
  • Daniel Marjamäki

    Good idea!

     
  • Daniel Marjamäki

    The SetClipboardData() is configured here:
    https://github.com/danmar/cppcheck/blob/1.87/cfg/windows.cfg#L3068

    It sounds like the configuration should not say <leak-ignore>. I'll remove it. If you see any other problems related to "windows sdk" you can check if the windows.cfg has proper configuration for the functions.

     
    • Zufu Liu

      Zufu Liu - 2019-06-28

      Thanks.

       
  • Maximilian Jörg

    Hi Daniel,
    I was trying to use a .clang-tidy file to configure the analysis, but it appears to not work. I'm not sure if my setup is correct, that's why I want to confirm whether the feateure was implemented at all or whether it is still an open request.
    Would be great to have this option available.
    thanks

     
  • Daniel Marjamäki

    The ticket that we created in trac: https://trac.cppcheck.net/ticket/9190

    If anybody would have time to fix that please feel free to do it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.