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

Minimizing the clang-tidy exception list #29

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

sean-parent
Copy link
Member

Enabled all clang-tidy checks except:

  • Those required to compile with gtest
  • Those used to validate restricted language subsets for specialized purposes

Copy link
Contributor

@dabrahams dabrahams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stopped reviewing after a while when I discovered this PR has a massive number of changes not described by its title.

.clang-tidy Outdated

WarningsAsErrors: ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we wouldn't be making semantically meaningless changes. Is all the quotation mark and whitespace conversion coming from your personal tool? If so I guess we should revert it.

They seem to account for 95% of the changes in this file.

CMakeLists.txt Outdated
@@ -57,7 +57,6 @@ add_library(adobe_contract_checking::adobe_contract_checking_warnings ALIAS adob
add_subdirectory(configured_files)

# Adding the src:
add_subdirectory(src)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this part of this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to use a different base commit for the PR?

*/

/**************************************************************************************************/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is being overly-pedantic, but… separate PR?

CMakeLists.txt Outdated
@@ -94,7 +93,6 @@ endif()

if(BUILD_TESTING)
include(CTest)
message(AUTHOR_WARNING "Building Tests. Be sure to check out test/constexpr_tests.cpp for constexpr testing")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be in this PR.

@@ -4,6 +4,7 @@ if(BUILD_TESTING)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/ff233bdd4cac0a0bf6e5cd45bda3406814cb2796.zip
DOWNLOAD_EXTRACT_TIMESTAMP "ON"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be part of this PR

@@ -1,5 +1,4 @@
include(cmake/SystemLink.cmake)
include(cmake/LibFuzzer.cmake)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to this file shouldn't be part of this PR

README.md Outdated
@@ -1,42 +1,42 @@
[![ci](https://github.com/stlab/adobe-contract-checks/actions/workflows/ci.yml/badge.svg)](https://github.com/stlab/adobe-contract-checks/actions/workflows/ci.yml)
[![CodeQL](https://github.com/stlab/adobe-contract-checks/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stlab/adobe-contract-checks/actions/workflows/codeql-analysis.yml)

------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to this file shouldn't be part of this PR. Meaningless format changes especially.

@dabrahams
Copy link
Contributor

The most ideal situation for clients would be to enable ALL clang-tidy checks and then disable them with inline comments as needed. Maybe that's just ridiculous; I don't know. The C++ include model is so broken; I don't know what library authors are expected to do about this.

@sean-parent
Copy link
Member Author

I think you're looking at the changes from main? Some of your comments are regarding the branch this is based on.

@dabrahams
Copy link
Contributor

I'm not sure how to review this if you only mean a fraction of the changes that are shown to be reviewed. This PR has 14 commits.
The changes I see there are all the changes that would be made if this PR were merged to main. Did you intend something else? Do you know how to set the base branch of a PR?

At this point, if I were working on this, I would not be trying to preserve any history; I would make a new PR starting from main most likely with just the changes related to the PR description; it's probably just one commit.

@sean-parent sean-parent merged commit e7a2be8 into main Oct 22, 2024
15 checks passed
@sean-parent sean-parent deleted the sean-parent/clang-tidy-cleanup branch October 25, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants