-
Notifications
You must be signed in to change notification settings - Fork 229
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
Pub should parse Dart code to do more validation before uploading #343
Comments
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Added this to the Later milestone. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Removed Type-Defect label. |
<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl Removed this from the Later milestone. |
<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl Removed Oldschool-Milestone-Later label. |
I'd be happy to contribute code for bad transitive imports. |
That would be awesome! |
@matanlurey Can the linter be used for that to avoid duplicate work? dart-lang/linter#29 |
Sure that's possible. |
Whether or not this logic is in the linter, I'd still love to have it in the pub client. Not everyone lints, but everyone should know if they're going to be uploading something busted. |
Is there a way we can write it generically so pub warns you AND the linter
does without implementing 100% from scratch twice?
…On Fri, Dec 2, 2016 at 1:08 PM Natalie Weizenbaum ***@***.***> wrote:
Whether or not this logic is in the linter, I'd still love to have it in
the pub client. Not everyone lints, but everyone should know if they're
going to be uploading something busted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#343 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKQ7uF3grogF70f_yPE46dW-VDEgadxks5rEIjjgaJpZM4E6C8D>
.
|
I suppose you could shove the logic in a package, but I'm not sure the pub validation API and the linter API are similar enough to buy you much from doing that. |
I file #1981 for using Future from dart:core which we have talked about recently. @jakemac53 @matanlurey - are there any remaining validations that we feel should live in pub rather than the analyzer? Should we close this? |
Ideally there would be a way to run certain lints via |
I'm going to close this since I think it's no longer actionable. We'll continue to add individual issues for publish validation as we find them, with a specific focus on things in the pubspec. |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="96" height="96"hspace="10"> Issue by nex3
Originally opened as dart-lang/sdk#7198
Pub should do various sorts of validation that requires Dart code to be parsed. In particular:
Errors:
* Part files in "lib" outside of "lib/src".
Warnings:
* Dart files in "bin" without main() methods.
The text was updated successfully, but these errors were encountered: