Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLANG-TIDY] Introduce approach to suppress warnings in the third-party headers #106

Open
svlad-90 opened this issue Sep 9, 2020 · 0 comments · Fixed by #139
Open

[CLANG-TIDY] Introduce approach to suppress warnings in the third-party headers #106

svlad-90 opened this issue Sep 9, 2020 · 0 comments · Fixed by #139
Assignees
Labels
clang-tidy Issue, which is related to the clang-tidy build of the project non functional optimization Issue is related to coverage of the technical debt
Milestone

Comments

@svlad-90
Copy link
Owner

svlad-90 commented Sep 9, 2020

Currently, we have several warnings in clang-tidy build, which are related to the third-party headers:

  • antlr
  • Qt

Due to the absence of an approach, we've suppressed check of the whole cpp-s, which are using the headers with warnings:

  • set(RESTORE_CLANG_TIDY OFF)
    set(CLANG_TIDY_CACHED_VAL "")
    if( DMA_CLANG_TIDY_BUILD )
    set(RESTORE_CLANG_TIDY ON)
    set(CLANG_TIDY_CACHED_VAL CMAKE_CXX_CLANG_TIDY)
    set(CMAKE_CXX_CLANG_TIDY "")
    endif()
    add_library(DMA_PCRE STATIC
    PCREHelper.cpp)
    if( RESTORE_CLANG_TIDY )
    set(CMAKE_CXX_CLANG_TIDY CLANG_TIDY_CACHED_VAL)
    set(CLANG_TIDY_CACHED_VAL "")
    set(RESTORE_CLANG_TIDY OFF)
    endif()
  • set(RESTORE_CLANG_TIDY OFF)
    set(CLANG_TIDY_CACHED_VAL "")
    if( DMA_CLANG_TIDY_BUILD )
    set(RESTORE_CLANG_TIDY ON)
    set(CLANG_TIDY_CACHED_VAL CMAKE_CXX_CLANG_TIDY)
    set(CMAKE_CXX_CLANG_TIDY "")
    endif()
    add_library(DMA_filtersView_no_clang_tidy STATIC
    CFilterItemDelegate.cpp)
    if( RESTORE_CLANG_TIDY )
    set(CMAKE_CXX_CLANG_TIDY CLANG_TIDY_CACHED_VAL)
    set(CLANG_TIDY_CACHED_VAL "")
    set(RESTORE_CLANG_TIDY OFF)
    endif()

That is wrong. We should rather exclude failing headers than exclude our own cpp files.

This task is created to:

  • Create a rule, which will allow excluding specific cpp from clang-tidy's analysis without copy-pasting a big bunch of CMake directives
  • Investigate approach regarding how to move QT's headers to the system headers section
  • Investigate approach regarding how to suppress warnings in all third-party headers or at least in specific headers, which have warnings identified
@svlad-90 svlad-90 added non functional optimization Issue is related to coverage of the technical debt clang-tidy Issue, which is related to the clang-tidy build of the project labels Sep 9, 2020
@svlad-90 svlad-90 added this to the v.1.0.24 milestone Sep 9, 2020
@svlad-90 svlad-90 self-assigned this Sep 9, 2020
@svlad-90 svlad-90 modified the milestones: v.1.0.24, v.1.0.25 Oct 2, 2020
svlad-90 added a commit that referenced this issue Dec 24, 2020
…ject

1. [x] Have you followed the guidelines in our [Contributing document](../blob/master/CONTRIBUTING.md)?
2. [x] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change?
3. [x] Have you built the project, and performed manual testing of your functionality for all supported platforms - Linux and Windows?
4. [x] Is your change backward-compatible with the previous version of the plugin?

>>> Change description:

- Creation of the separate component from the filtersView folder of the project
- Adaptation of the project
- Update of the class diagrams
- Update of README
- Introduction of the cmake helper macro definitions which help to conveniently suppress clang_tidy analysis for a single library ( related to ISSUE #106 )

>>> Verification criteria:

- Manually checked on the Windows platform
- All sanity checks on Git Hub were passed
@svlad-90 svlad-90 reopened this Dec 24, 2020
@svlad-90 svlad-90 modified the milestones: v.1.0.25, v.1.0.27 May 25, 2023
@svlad-90 svlad-90 modified the milestones: v.1.0.27, v.1.0.28 Nov 15, 2023
@svlad-90 svlad-90 modified the milestones: v.1.0.28, backlog Jul 23, 2024
@svlad-90 svlad-90 moved this to To do in DLTMessageAnalyzer Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy Issue, which is related to the clang-tidy build of the project non functional optimization Issue is related to coverage of the technical debt
Projects
Status: To do
1 participant