Skip to content

Linter for pubspec.yaml #1009

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

Closed
DartBot opened this issue Jun 5, 2015 · 6 comments
Closed

Linter for pubspec.yaml #1009

DartBot opened this issue Jun 5, 2015 · 6 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

Originally opened as dart-lang/sdk#19407

This issue was originally filed by [email protected]


Based on this discussion at the Sublime Text package repo:

guillermooo/dart-sublime-bundle#94

At the moment, when you run pub install and the pubspec.yaml contains errors, you get error information spat back at you. But there is no sanitize only option; you must run the install process every time.

If you could tell pub to simply check the file for errors, the user could be warned in advance by tools such as Sublime Text.

This is a long-winded way of asking for a pubspecanalyzer in the spirit of dartanalyzer. :)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2130849?v=3" align="left" width="48" height="48"hspace="10"> Comment by kaendfinger


I'll work on a 'pub validate' command

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="48" height="48"hspace="10"> Comment by seaneagan


I wouldn't mind adding this to den:

http://pub.dartlang.org/packages/den

which is focused on pubspec analysis and manipulation, and it should be trivial to add once issue #1154 is fixed.

Of course, I'd be fine with it being in pub itself as well.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="48" height="48"hspace="10"> Comment by seaneagan


The pub publish validation should be part of it as well. If you're doing tagged version commits, you generally want to validate first, then do the commit, then publish. If you wait until publish to find the issues, then you need to redo your tagged version commit.

@DartBot DartBot added the type-enhancement A request for a change that isn't a bug label Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/67586?v=3" align="left" width="48" height="48"hspace="10"> Comment by pq


A number of pub-related lints are being proposed for the dart linter (https://github.com/dart-lang/linter/) and I'm well on the way to having the plumbing in place to start implementing them... Feel free to add ideas there!

@nex3
Copy link
Member

nex3 commented Dec 10, 2015

Between the linter and pub publish --dry-run, I don't think there's a strong need for a dedicated pubspec linter anymore.

@nex3 nex3 closed this as completed Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants