Comments (7)
While doing that, I encountered an issue, so I thought to create an issue and debug.
And we appreciate that, thanks!
I didn't want to create that linter using a non-dart tool since ARB files are used for localization by flutter apps ...
Linting ARB files might very well be a compelling enough case. Thanks!
@mossmana @anderdobo for visibility
from sdk.
from sdk.
The dart.additionalAnalyzerFileExtensions
setting in the VS Code extension was for the legacy analysis server integration because we needed to know which extensions to interact with the server for.
In LSP, the server can declare these file types itself dynamically, so the setting is unnecessary.
In the code linked above, it uses the getter fullySupportedTypes
, which types that plugins declare they are interested in:
An example of how a plugin declares this interest is here:
It's not clear to me if the plugin here knows what types the lint is trying to use, but I do think it would be better to handle this somehow via the plugin rather than use this setting because that setting requires specific client configuration and this seems like something the server/plugin should be able to just make work automatically.
from sdk.
I wasn't aware that dart.additionalAnalyzerFileExtensions
setting is only for legacy analysis server integration. Perhaps a documentation update here and in VSCode at some point would make sense?
For the bug, I looked into it more. It looks like there was an update needed in custom_lint
and it wasn't a bug in the sdk. However, even after the feature registration is done with the extension included, I still did not see the files getting reanalyzed. I'm not sure if this is correct, but I believe at
sdk/pkg/analyzer/lib/src/dart/analysis/driver.dart
Lines 611 to 618 in d91f05c
_pendingFileChanges
, resulting in affected
at sdk/pkg/analyzer_plugin/lib/plugin/plugin.dart
Lines 140 to 145 in d91f05c
from sdk.
Perhaps a documentation update here and in VSCode at some point would make sense?
Yes, this should be made clearer - I've opened Dart-Code/Dart-Code#5133 to update the description against the setting (which shows both in VS Code and on the site).
However, even after the feature registration is done with the extension included, I still did not see the files getting reanalyzed. I'm not sure if this is correct, but
I'm not too familiar with this code - @scheglov or @srawlins may be best placed to comment. I think the question is whether ServerPlugin.handleAffectedFiles
should be called with/passed non-Dart files that were passed to contentChanged
. Currently it gets just the result from analysisContext.applyPendingFileChanges()
which seems to only include Dart files.
(I've updated the title to something I think is more accurate for the current issue)
from sdk.
IIRC, this support was added to support the Angular Dart plugin. Those products were discontinued a long time ago and a lot of code has changed since then. I suspect that support for this feature has bit-rotted in the interval.
We'd probably need a fairly compelling case to justify the effort required to make it work again. Can you tell us why you want/need support for this?
from sdk.
IIRC, this support was added to support the Angular Dart plugin. Those products were discontinued a long time ago and a lot of code has changed since then. I suspect that support for this feature has bit-rotted in the interval.
We'd probably need a fairly compelling case to justify the effort required to make it work again. Can you tell us why you want/need support for this?
I was trying to build a linter that analyzes non dart files. I didn't want to create that linter using a non-dart tool since ARB files are used for localization by flutter apps, and so it made sense to use a tool already available there - dart analyzer. At the time of creating that, it was mostly just a prototype that I built for learning purposes. While doing that, I encountered an issue, so I thought to create an issue and debug.
from sdk.
Related Issues (20)
- Failures on [dart2wasm] Use unsafeCast in a few places...Reland "[vm] Move `ResolveUri` to bin" HOT 1
- Analyzer data-based fix request HOT 2
- `dart compile js` fails with the newest SDK HOT 17
- Cannot resolve top-level methods with docimports HOT 4
- [Wildcard Variables] Update `DUPLICATE_DEFINTION` reporting
- CFE fails to report error when `super` is used in a redirecting constructor. HOT 2
- DevTools not serving properly on app refresh HOT 1
- [Wildcard Variables] Update `DUPLICATE_FIELD_FORMAL_PARAMETER` reporting
- `@internal` annotation does not supress `public_member_api_docs` lint on functions HOT 1
- Dart analyzer does not infer the correct type for generic record HOT 2
- Having true cancelable future HOT 2
- Simplify branch conditions based on ranges & simplify control flow afterwards if condition turns out to be constant
- Issue in number multiplication with 10, 20, etc HOT 4
- Feature Request: Add `--insert-ignore-comments` flag to `dart fix` command for existing code HOT 3
- [vm/core] `_GrowableList.add` has unnecessary bounds check
- docImports failing to allow for resolution in some flutter animation library code HOT 4
- Implement augmentations HOT 5
- Support macros when analyzer is used as a library HOT 1
- Is that possible to set breakpoints in the macro code itself? HOT 2
- Inability to Convert Dart BigInt to JSBigInt using new js_interop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.