[DAS] Makes `AbstractContextTest.createAnalysisOptionsFile` like `analysisOptionsContent`
This change is only meant to improve consistency and readability in the test code. The `analysisOptionsContent` function had more parameters and now both take the same things. Also, `createAnalysisOptionsFile` now doesn't implement the same behaviour as `analysisOptionsContent` because it simply invokes it instead.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Map<String, Object?> errors = const {},
Could this be `String`? It isn't critical to landing this, but I think they always have to be strings, so we might as well make it explicit.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Map<String, Object?> errors = const {},
Could this be `String`? It isn't critical to landing this, but I think they always have to be strings, so we might as well make it explicit.
Tecnically everything in a file is a String, yes, but we can write things like `annotate_overrides: false` where `false` is actually a `bool` and not a String. I'm fine with changing it, but asking to be sure.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Map<String, Object?> errors = const {},
Felipe MorschelCould this be `String`? It isn't critical to landing this, but I think they always have to be strings, so we might as well make it explicit.
Tecnically everything in a file is a String, yes, but we can write things like `annotate_overrides: false` where `false` is actually a `bool` and not a String. I'm fine with changing it, but asking to be sure.
The question is, is there any value, in test code, of writing
```dart
analysisOptionsContent(errors: {'annotate_overrides': false});
```
rather than
```dart
analysisOptionsContent(errors: {'annotate_overrides': 'false'});
```
given that there's effectively no type checking either way? (And that we're using `toString` rather than being smart about the output, which means that lists and maps can't be safely passed in.)
But given that this is test code, I suppose it doesn't matter much anyway, so I'll leave it to you to decide.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Map<String, Object?> errors = const {},
Felipe MorschelCould this be `String`? It isn't critical to landing this, but I think they always have to be strings, so we might as well make it explicit.
Brian WilkersonTecnically everything in a file is a String, yes, but we can write things like `annotate_overrides: false` where `false` is actually a `bool` and not a String. I'm fine with changing it, but asking to be sure.
The question is, is there any value, in test code, of writing
```dart
analysisOptionsContent(errors: {'annotate_overrides': false});
```
rather than
```dart
analysisOptionsContent(errors: {'annotate_overrides': 'false'});
```
given that there's effectively no type checking either way? (And that we're using `toString` rather than being smart about the output, which means that lists and maps can't be safely passed in.)But given that this is test code, I suppose it doesn't matter much anyway, so I'll leave it to you to decide.
Well, I guess we can leave this as is. I suppose that `String.toString()` is probably really smart and any other cases being handled internally by the method should be easier for us to call it. I'll mark this as resolved but if we ever want to change this in the future the change should be a fairly small CL anyway. Thanks for the discussion.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can I get a review here please? Firendly ping @sraw...@google.com. Thanks a lot!
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Can I get a review here please? Firendly ping @sraw...@google.com. Thanks a lot!
I've fixed the broken tests (missing condition to add `analyzer` keyword). Ran all of the broken files locally, things are working now. Thanks for the bots!
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Felipe MorschelCan I get a review here please? Firendly ping @sraw...@google.com. Thanks a lot!
I've fixed the broken tests (missing condition to add `analyzer` keyword). Ran all of the broken files locally, things are working now. Thanks for the bots!
I've tried rebasing (using Gerrit UI) to see if the g3 bot passes now.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[DAS] Makes `AbstractContextTest.createAnalysisOptionsFile` like `analysisOptionsContent`
This change is only meant to improve consistency and readability in the test code. The `analysisOptionsContent` function had more parameters and now both take the same things. Also, `createAnalysisOptionsFile` now doesn't implement the same behaviour as `analysisOptionsContent` because it simply invokes it instead.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |