-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-plugintype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
You can parameterize lint rule messages with {0}
, {1}
today. (This will change with @stereotype441 's ongoing work, but for now...). Then when you report a diagnostic, the number of arguments must match the number of parameters. And the arguments must all be Strings. (Or maybe a few types like Strings and DartTypes...)
Today, if you get either of those things wrong, the test hangs and times out after 30 seconds. :/ Examples:
// Zero parameters:
static const LintCode code = LintCode('foo', 'Foo');
// One argument supplied:
rule.reportAtNode(node, arguments: [context.package!]);
// One parameter:
static const LintCode code = LintCode('foo', 'Foo {0}');
// Zero arguments supplied:
rule.reportAtNode(node);
and
// One parameter:
static const LintCode code = LintCode('foo', 'Foo {0}');
// One argument supplied, but it is not a String:
rule.reportAtNode(node, arguments: [context.package!]);
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-plugintype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)