This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow engine variants other than "host_debug" to be clang-tidy linted #29668
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
15a6f9e
Allow engine variant to be passed into linter script
jmagman 78845fd
check options
jmagman 1bb1424
Fix help message
jmagman b04ab6b
Show all lint failures, not just the first
jmagman 6e33389
Use .clang-format when fixing files
jmagman 23d6a03
Remove --repo
jmagman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,15 @@ | ||
| # clang_tidy | ||
|
|
||
| This is a Dart program/library that runs clang_tidy over modified files. It | ||
| takes two mandatory arguments that point at a compile_commands.json command | ||
| and the root of the Flutter engine repo: | ||
| This is a Dart program/library that runs clang_tidy over modified files in the Flutter engine repo. | ||
|
|
||
| By default the linter runs on the repo files changed contained in `src/out/host_debug/compile_commands.json` command. | ||
| To check files other than in `host_debug` use `--target-variant android_debug_unopt`, | ||
| `--target-variant ios_debug_sim_unopt`, etc. | ||
|
|
||
| Alternatively, use `--compile-commands` to specify a path to a `compile_commands.json` file. | ||
|
|
||
| ``` | ||
| $ bin/main.dart --target-variant <engine-variant> --repo <path-to-repo> | ||
| $ bin/main.dart --compile-commands <compile_commands.json-path> --repo <path-to-repo> | ||
| $ bin/main.dart --help | ||
| ``` |
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
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
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.
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.
If you're computing this here, maybe we don't need the
--repocommand line argument anymore. Or the other way around, if you have the--repoargument, this is just the parent directory of that, right?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.
Was there any case where
--reponeeds to handle some other repo directory? I wasn't sure why it was passed in in the first place.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 pattern is probably safe here since we're always running the script from source, but it would break if the script were compiled to a snapshot and then the snapshot moved somewhere else before being run.
We can keep this and get rid of the
--repoargument if that is simpler.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.
If you do that and it doesn't work: Give The Script A Break 🙂
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.
Removed
--repo.