[DAS, linter] Fixes `no_leading_underscores` fixes when shadowing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
I've sent two separate patches so you can clearly see what I did just for the fix correction-sake and what I did for the lint changes.
bool isShadowedAtSomeReference(String newName, Element element, AstNode body) {I'm not sure this should be here (in this new file, at this location) and in what form (standalone function), so whatever suggestions here around that will be appreciated.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +1 |
references.addAll({Why are we adding the entries in this literal map to `references` rather than just assigning the map to `reference`?
bool isShadowedAtSomeReference(String newName, Element element, AstNode body) {I'm not sure this should be here (in this new file, at this location) and in what form (standalone function), so whatever suggestions here around that will be appreciated.
I don't have a strong opinion about which file this support should be in.
I'm not a fan of top-level functions (preferring to stick to object-oriented solutions), so I'd probably make these extension methods on `AstNode`:
```dart
extension AstNodeExtention on AstNode {
AstNode get enclosingBody { ... }
bool isShadowedInNode(String newName, Element element) { ... }
}
```That isn't a requirement, and I'm not sure it's the _best_ alternative, just what comes to mind.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
references.addAll({Why are we adding the entries in this literal map to `references` rather than just assigning the map to `reference`?
Oh, thanks! That was a small refactor. I originally had the for loop around the add. I'll wait for the bots to push a new patch for this.
bool isShadowedAtSomeReference(String newName, Element element, AstNode body) {Brian WilkersonI'm not sure this should be here (in this new file, at this location) and in what form (standalone function), so whatever suggestions here around that will be appreciated.
I don't have a strong opinion about which file this support should be in.
I'm not a fan of top-level functions (preferring to stick to object-oriented solutions), so I'd probably make these extension methods on `AstNode`:
```dart
extension AstNodeExtention on AstNode {
AstNode get enclosingBody { ... }bool isShadowedInNode(String newName, Element element) { ... }
}
```That isn't a requirement, and I'm not sure it's the _best_ alternative, just what comes to mind.
Alright, I'll refactor this too. Probably move to `extensions.dart` (I think we have that here in linter too? I'll find out)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
FMorschelWhy are we adding the entries in this literal map to `references` rather than just assigning the map to `reference`?
Oh, thanks! That was a small refactor. I originally had the for loop around the add. I'll wait for the bots to push a new patch for this.
Done
Future<void> test_importPrefix_withPart() async {This was passing on Windows due to new line normalization. I believe my change makes it work correctly on any OS 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. |
| Auto-Submit | +1 |
Future<void> test_importPrefix_withPart() async {This was passing on Windows due to new line normalization. I believe my change makes it work correctly on any OS now.
Okay, I completely missed using the correct variable in `assertHasFixForTarget`. Now it really should work. 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. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[DAS, linter] Fixes `no_leading_underscores` fixes when shadowing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |