-
Notifications
You must be signed in to change notification settings - Fork 6k
Clang-tidy: cleaned up the output. #37059
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Here is an example output for one file with the current state: |
jmagman
left a comment
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.
I think this would be testable?
engine/tools/clang_tidy/test/clang_tidy_test.dart
Lines 206 to 207 in e39c4df
| final StringBuffer outBuffer = StringBuffer(); | |
| final StringBuffer errBuffer = StringBuffer(); |
tools/clang_tidy/lib/clang_tidy.dart
Outdated
| return _ComputeJobsResult(jobs, sawMalformed); | ||
| } | ||
|
|
||
| Iterable<String> _trimGenerator(String output) sync* { |
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.
You can test this by making it public, adding the @visibleForTesting annotation, and writing a unit test in clang_tidy/test/clang_tidy_test.dart
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.
done
|
test added |
440f81c to
51cb278
Compare
Previously we would print out errors twice (or thrice if you had
--verbose). Also we were printing out the invocation which isn't necessary now that the--verboseflag does that. Users want to know the filename and a quick description of the errors.issue: flutter/flutter#113848
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.