GeezerVison is showing github.com — Ruff rules for comprehensions and performance by cclauss · Pull Request #329 · cpplint/cpplint
Conversation
cclauss
commented
Mar 7, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
% ruff check --select=C4,PERF --output-format=concise
cpplint.py:60:21: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:829:22: C404 Unnecessary list comprehension (rewrite as a dict comprehension)
cpplint.py:948:16: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1041:10: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1046:59: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1104:23: C417 Unnecessary `map()` usage (rewrite using a set comprehension)
cpplint.py:6072:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6088:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6096:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6106:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6743:31: C414 Unnecessary `list()` call within `sorted()`
cpplint.py:6744:17: C414 Unnecessary `list()` call within `sorted()`
cpplint.py:6930:7: PERF401 Use a list comprehension to create a transformed list
cpplint_unittest.py:4262:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4268:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4274:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4275:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4281:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4282:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4332:32: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4333:37: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4358:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4376:18: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:5630:28: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:5631:33: C405 Unnecessary list literal (rewrite as a set literal)
Found 25 errors.
No fixes available (20 hidden fixes can be enabled with the `--unsafe-fixes` option).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double space at "_USAGE " - odd that ruff isnt picking that up
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be automatically fixed when we add ruff format to pre-commit.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
jayvdb
Awaiting requested review from jayvdb
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.