Skip to content

Don't err on non-const references by default #305

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

Merged
merged 8 commits into from
Apr 7, 2025
Merged

Don't err on non-const references by default #305

merged 8 commits into from
Apr 7, 2025

Conversation

aaronliu0130
Copy link
Member

@aaronliu0130 aaronliu0130 commented Jan 30, 2025

As a side note, we should probably consider not running filtered checks sometime in the future.

Please squash on merge with GitHub's shiny button.

@aaronliu0130 aaronliu0130 linked an issue Jan 30, 2025 that may be closed by this pull request
@aaronliu0130
Copy link
Member Author

aaronliu0130 commented Jan 30, 2025

Will fix test errors after #304 is merged so the changes to expected output don't conflict.

@aaronliu0130 aaronliu0130 marked this pull request as draft January 30, 2025 03:17
@aaronliu0130 aaronliu0130 marked this pull request as ready for review March 8, 2025 00:26
@aaronliu0130 aaronliu0130 requested review from jayvdb and cclauss March 8, 2025 01:08
@cclauss
Copy link
Member

cclauss commented Mar 16, 2025

Please rebase.

CHANGELOG.rst Outdated
@@ -10,6 +10,7 @@ Yet another overdue... hotfix. Sorry this took so long.
* The false positive for indented function parameters in namespaces was eradicated. (https://github.com/cpplint/cpplint/pull/304)
* build/include-what-you-use now recognizes c-style headers, such as <stdio.h> for symbols from <cstdio>. (https://github.com/cpplint/cpplint/pull/319)
* The warning on non-const references (runtime/references) is now disabled by default pursuant to the May 2020 Google style guide update. (https://github.com/cpplint/cpplint/pull/305)
* Ruff was ran on the project to improve performance and reader comprehension thanks to @cclauss.
Copy link
Member Author

@aaronliu0130 aaronliu0130 Mar 17, 2025

Choose a reason for hiding this comment

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

  1. That would be for a different PR, maybe the bump release date one.
  2. There's way more changes to improve performance than comprehensions and I don't see the need to single this out. Plus there are indeed many readability linter changes

@aaronliu0130
Copy link
Member Author

pls review

@aaronliu0130 aaronliu0130 requested review from cclauss and removed request for cclauss March 24, 2025 15:49
@cclauss
Copy link
Member

cclauss commented Apr 2, 2025

Please rebase your pull requests to resolve git conflicts with https://github.com/cpplint/cpplint/releases v2.0.1.

@aaronliu0130
Copy link
Member Author

Sure. I wonder why you decided to release instead of merge, though, especially the other namespace indentation fix still pending; that one's vital (though less vital than the original fix) since codebases that are quality enough to use namespaces can be expected to use member initializer lists when suitable, and classes with simple member value assignments in the constructor are quite common.

@cclauss
Copy link
Member

cclauss commented Apr 2, 2025

Pull requests which remove tests are difficult to approve. Now that release capabilities are proven, we can release whenever there are useful changes.

@aaronliu0130
Copy link
Member Author

Well, the namespace indentation thing didn't remove any tests either. And it's extremely useful.

@@ -3,7 +3,7 @@ src/*
4
Done processing src/pptable.cpp
Done processing src/pptable.h
Total errors found: 685
Total errors found: 675
Copy link
Member

Choose a reason for hiding this comment

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

Are we finding fewer expected errors?

@@ -3,22 +3,17 @@
4
Done processing src/sillycode.cpp
Done processing src/sillycode.w
Total errors found: 26
Total errors found: 21
Copy link
Member

Choose a reason for hiding this comment

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

Are we finding fewer expected errors?

Category 'runtime' errors found: 12
Total errors found: 22
Category 'runtime' errors found: 7
Total errors found: 17
Copy link
Member

Choose a reason for hiding this comment

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

Are we finding fewer expected errors?

@@ -2,7 +2,7 @@
1
3
Done processing src/sillycode.cpp
Total errors found: 123
Total errors found: 118
Copy link
Member

Choose a reason for hiding this comment

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

Are we finding fewer expected errors?

@@ -3,7 +3,7 @@ src/*
4
Done processing src/sillycode.cpp
Done processing src/sillycode.w
Total errors found: 126
Total errors found: 121
Copy link
Member

Choose a reason for hiding this comment

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

Are we finding fewer expected errors?

@aaronliu0130
Copy link
Member Author

aaronliu0130 commented Apr 3, 2025

Yes, and this PR is not the namespace indentation thing I was talking about.

@cclauss
Copy link
Member

cclauss commented Apr 7, 2025

Please resolve the git conflict in CHANGELOG.rst, and then I will approve this pull request.

@cclauss cclauss merged commit 97ab22d into develop Apr 7, 2025
16 checks passed
@cclauss cclauss deleted the nonconst branch April 7, 2025 17:53
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.

Non-const reference parameters are still not allowed
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy