Index: pkg/analysis_server/lib/src/services/linter/linter.dart |
diff --git a/pkg/analysis_server/lib/src/services/linter/linter.dart b/pkg/analysis_server/lib/src/services/linter/linter.dart |
index 675836cee49a2b164f88c34f460bf4034338d34c..964c238d0487f82764e632848baa60603e9969b8 100644 |
--- a/pkg/analysis_server/lib/src/services/linter/linter.dart |
+++ b/pkg/analysis_server/lib/src/services/linter/linter.dart |
@@ -40,9 +40,10 @@ class LinterRuleOptionsValidator extends OptionsValidator { |
//TODO(pq): migrate this to a proper API once there is one. |
Iterable<String> registeredLints = ruleRegistry.map((r) => r.name); |
rules.nodes.forEach((YamlNode ruleNode) { |
- if (!registeredLints.contains(ruleNode.value)) { |
+ Object value = ruleNode.value; |
+ if (value != null && !registeredLints.contains(value)) { |
reporter.reportErrorForSpan( |
- UNDEFINED_LINT_WARNING, ruleNode.span, [ruleNode.value]); |
+ UNDEFINED_LINT_WARNING, ruleNode.span, [value]); |
} |
}); |
} |