Comments (8)
If we intend the file to be public, I'll recommend adding a version number to the format, so that we can change the format in the future, and told depending on the file can tell that they're not compatible with the new format.
If the file is not intended to be public, consider adding a notice, maybe:
{
"_NOTICE:_": "This file is for internal use by the SDK. Format may change without notice.",
"lints": ... current content ...
}
(Oh why does JSON not have comments!)
from sdk.
@parlough: do we have a copy of rules.json somewhere on dart.dev or am I mis-remembering?
Not directly hosted on the site, but it's mirrored at https://github.com/dart-lang/site-www/blob/main/src/_data/linter_rules.json and used to generate the the linter rule docs that are indexed at https://dart.dev/tools/linter-rules#rules.
I don't think we intend for it to be public
Originally it was. The impetus was a tool csells built. I expect it's no longer being maintained but it's possible there are others. Parker may know more...
Currently the machine/rules.json
file has no versioning strategy and its current form will likely be retired soon as we introduce new documentation for choosing lints (dart-lang/site-www#4499, dart-lang/site-www#4498). So keeping that in mind, I'd say it's best to consider the current file as not public.
The final form of its replacement hasn't been decided yet, but I'll update here when it is ready and will keep in mind the use cases outlined here as well as any potential versioning concerns.
from sdk.
@parlough: do we have a copy of rules.json
somewhere on dart.dev
or am I mis-remembering?
I don't think we intend for it to be public
Originally it was. The impetus was a tool @csells built. I expect it's no longer being maintained but it's possible there are others. Parker may know more...
from sdk.
Oh very cool! In that case I like the versioning suggestion.
from sdk.
I believe this rules.json file is being used by @gaetschwartz to produce the all_lint_rules_community package. Does the Dart team produce an alternative? I absolutely love having all of the lint rules turned on by default, with some that I turn off. I catch so many problems in my code doing that.
from sdk.
/fyi @parlough
from sdk.
I don't think we intend for it to be public, or to have to consider versioning or consider any change to it a "breaking" change.
from sdk.
Thanks @parlough!
from sdk.
Related Issues (20)
- [vm/core] Inlining `_GrowableList.add` bloats program too much HOT 2
- vm/dart/isolates/shared_primitives_test changing from flaky to RTE on vm-reload-linux-debug-x64 HOT 2
- [diagnostic] don't report `DUPLICATE_FIELD_NAME` if the name is invalid
- Refactoring to convert params/args between positional and named HOT 2
- Analyzer exception doesn't specify affected file HOT 2
- VM always prints "<isolate> has no debugger is attached and is paused"
- [dart2wasm] UnimplementedError when calling Flutter's Matrix4.translate with an integer argument HOT 2
- `where` can't accept an async predicate HOT 6
- [Augmentations] Wrong error in the analyzer when augmenting enum member
- [Augmentations] No error in the analyzer when augmenting a function type with no augmented type
- [Augmentations] No error in analyzer for mixin and extension when augmentation is before original declaration HOT 1
- [Augmentations] Analyzer crash on co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A01_t01
- [Augmentations] Analyzer error when augmenting representation variable
- [Augmentations] Omitted type bound is not inherited
- [Augmentations] No error in the analyzer if augmentation declares a different return type HOT 2
- The integer negative zero formats as "-0.0" HOT 7
- [dart2js] bug in global inference with `call` getter HOT 1
- DevTools URI opens to a white screen
- Isolate.run error run with closure HOT 4
- LateInitializationError in ResolutionVisitor.visitForEachPartsWithPattern in resolution_visitor.dart 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.