Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new lint to check for unused external classes in the configuration and updates relevant tests and configuration files accordingly. Key changes include:
- Adding a snapshot file that records the expected lint warnings.
- Enabling the new lint in the project tests configuration.
- Implementing the lint logic and tree traversal for detecting unused externs.
- Minor adjustments in duplicate external declarations and dependency updates.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/config/tests/snapshots/lints__config_error_c14_unused_external.snap | Adds snapshot output for unused extern warnings |
| libs/config/tests/lints/project_tests.toml | Enables the new lint in the test configuration |
| libs/config/tests/lints/c14_unused_external.hpp | Defines test classes exhibiting unused extern behavior |
| libs/config/tests/lints/c03_duplicate_external.hpp | Adjusts duplicate external declarations for consistency |
| libs/config/tests/lints.rs | Registers the new lint call |
| libs/config/src/analyze/lints/c14_unused_external.rs | Implements the lint analysis logic and reporting |
| libs/config/Cargo.toml | Adds dependency on indexmap required by the new lint |
BrettMayson
reviewed
Jun 22, 2025
* config: enable c14 by default * change message * Update bin/src/commands/check.rs Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
might be a smell that something is wrong with configs
unless there is a legit reason to extern things that are not used?