Skip to content
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

Dart project not getting set when lints are run from within DAS. #154

Closed
pq opened this issue Nov 16, 2015 · 6 comments
Closed

Dart project not getting set when lints are run from within DAS. #154

pq opened this issue Nov 16, 2015 · 6 comments
Labels
customer-google3 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@pq
Copy link
Member

pq commented Nov 16, 2015

For example, package_prefixed_library_names here: dart-lang/sdk#24947.

@pq pq added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Nov 16, 2015
@devoncarew
Copy link
Member

Is this still an issue?

@devoncarew
Copy link
Member

I see it referenced from the package_prefixed_library_names.dart file.

@pq
Copy link
Member Author

pq commented Sep 25, 2019

Is this still an issue?

I believe so. It looks like we're only initializing project instances here:

https://github.com/dart-lang/sdk/blob/bd3792e7142a6410f3b1fc1289769f14f7ea58cd/pkg/analyzer/lib/src/lint/analysis.dart#L210-L215

    DartProject project = await DartProject.create(analysisDriver, sources);
    Registry.ruleRegistry.forEach((lint) {
      if (lint is ProjectVisitor) {
        (lint as ProjectVisitor).visit(project);
      }
    });

@davidmorgan
Copy link
Contributor

I came here from package_api_docs.dart; it's not firing in google3 at all, it looks like we need to wire this up somehow. Any pointers please?

@pq
Copy link
Member Author

pq commented Oct 31, 2019

Also related: #1786.

The rub is our notion of "project" hinged on the presence of a pubspec. That obviously doesn't translate to google3. We're part of the way there to a better solution where LinterContext will surface the workspace package which we can use to identify package/project roots.

For that, see: https://dart-review.googlesource.com/c/sdk/+/123341

When we have a new analyzer roll (cc @stereotype441), we can start playing around with that.

@pq
Copy link
Member Author

pq commented May 18, 2022

Picked up in #3395.

@pq pq closed this as completed May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-google3 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants