New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library prefixes should allow starting with _
#684
Comments
The current real world use case is in code_builder. |
CC @matanlurey |
@munificent : this looks reasonable to me; curious if you have any thoughts? |
It doesn't violate the style guide, so it's fine with me. It is a little weird to use a leading underscore for an identifier where privacy rules don't come into play. 😕 |
Thanks @munificent!
I hear you. I think the idea is to communicate a "this is an internal detail" intent (and avoid possible collisions). @matanlurey and @srawlins can edify though. |
What will it take to change this? Looks like we need to tweak the regex here? |
I'll take a look at this today. 👍 |
Possibly. We'd need to see what other rules that change would effect, though. We might need to add a second regex that allows underscore and fix the code so that the new regex is used where appropriate. |
@bwilkerson : I've looked into it and it's not bad. I've got an approach in mind. Stay tuned! 😄 |
R=scheglov@google.com Review URL: https://codereview.chromium.org/2553203002 .
Has this regressed? 2.0.0-dev.6.0 is reporting this lint for prefixes like |
Hey @natebosch! It looks like in HEAD, |
I thought I tested Testing now with dev-6.0 I'm not seeing a lint. Either it's been fixed in between or I was holding it wrong when I was testing last night. I think it's fine that |
This matches old behavior and is a little more clear than just a digit. This will also satisfy the lint on the latest SDK. See dart-lang/linter#684 (comment)
Excellent. Thanks for following up! 👍 |
This matches old behavior and is a little more clear than just a digit. This will also satisfy the lint on the latest SDK. See dart-lang/linter#684 (comment)
Related to #294
violates library_prefixes with "Use☹️
lowercase_with_underscores
when specifying a library prefix." Buuuut it looks good to me.The text was updated successfully, but these errors were encountered: