Skip to content

Having to define analysis_options in every package is cumbersome. #26154

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
pylaligand opened this issue Mar 31, 2016 · 14 comments
Closed

Having to define analysis_options in every package is cumbersome. #26154

pylaligand opened this issue Mar 31, 2016 · 14 comments
Labels
customer-flutter devexp-server Issues related to some aspect of the analysis server legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on

Comments

@pylaligand
Copy link
Contributor

My repository hosts 15+ Dart packages and defines one .analysis_options file at the root. It looks like that options file is ignored by Atom which shows me all sorts of lint warnings when the file only specifies a handful (and a manual run of dartanalyzer only shows those).

/cc @devoncarew

@devoncarew devoncarew added devexp-server Issues related to some aspect of the analysis server customer-flutter labels Mar 31, 2016
@devoncarew
Copy link
Member

also cc @pq

@floitschG floitschG added the legacy-area-analyzer Use area-devexp instead. label Apr 1, 2016
@bwilkerson
Copy link
Member

I believe the expectation is for each package to have its own options file, but it sounds like the options file is in the directory containing all of the packages. Is that true?

If so, does it work correctly (for one of the packages) if you copy the file to the root of the package?

@pylaligand
Copy link
Contributor Author

Yes.

No.

@pq
Copy link
Member

pq commented Apr 4, 2016

If so, does it work correctly (for one of the packages) if you copy the file to the root of the package?

No.

I'd like to try and reproduce this. Is your repo public?

@pylaligand
Copy link
Contributor Author

It is not, but I can create one that reproduces the issue if that's helpful.

@pq
Copy link
Member

pq commented Apr 4, 2016

That would be great. Thanks!

@pylaligand
Copy link
Contributor Author

So I tried to put together a smaller repo exhibiting the issue, but while the options file does not get picked up if it is placed at the root of the project, it does work when copied to the root of the package.

I then went back to my repo, tried to restart analysis, restart Atom, but it still shows lints I'm not enabling either at the root of the project or the root of the package. As an example, I never set always_declare_return_types anywhere and yet I'm seeing plenty of "Declare method return types" infos in Atom.

Not sure where to go from here. Since we both work for Google, I guess I can add you to my repo.

@pq
Copy link
Member

pq commented Apr 4, 2016

So I tried to put together a smaller repo exhibiting the issue, but while the options file does not get picked up if it is placed at the root of the project, it does work when copied to the root of the package.

Right. Another source for confusion. Options correspond to packages. We often talk as if projects and packages were synonymous when often they're not.

Not sure where to go from here. Since we both work for Google, I guess I can add you to my repo.

Awesome. Happy to look.

@pq
Copy link
Member

pq commented Apr 4, 2016

I then went back to my repo, tried to restart analysis, restart Atom, but it still shows lints I'm not enabling either at the root of the project or the root of the package. As an example, I never set always_declare_return_types anywhere and yet I'm seeing plenty of "Declare method return types" infos in Atom.

On looking over the sources, I think I see (the other) source of confusion. What you're seeing are analysis options that are inherited from flutter, which identifies a number of analyses that get turned on for all clients.

cc @sethladd @Hixie

To summarize, I see two issues:

  1. Having options defined in 15 packages is cumbersome.
  2. Inheriting embedded options can be confusing.

@pylaligand
Copy link
Contributor Author

I filed dart-atom/atom-flutter#62 for the Flutter part. Wanna keep this one open for issue 1?

@pq pq changed the title .analysis_options filed ignored in Atom Having to define analysis_options in every package is cumbersome. Apr 5, 2016
@pq
Copy link
Member

pq commented Apr 5, 2016

Great. Yep. I re-named it to reflect the new thrust. Thanks!

@bwilkerson bwilkerson added the P2 A bug or feature request we're likely to work on label Apr 5, 2016
@pq
Copy link
Member

pq commented Apr 25, 2016

Kicked off a doc to explore a proposal here. Thoughts welcome!

@bwilkerson
Copy link
Member

@pylaligand Is this still an issue?

@pylaligand
Copy link
Contributor Author

I don't think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-flutter devexp-server Issues related to some aspect of the analysis server legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

5 participants