blob: 30634f3489903fa9e9bdb44187dac97eeab0e9ae [file] [log] [blame]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:linter/src/analyzer.dart';
import 'package:linter/src/rules.dart';
import 'package:test/test.dart';
void main() {
group('check for incompatible rules:', () {
for (var rule in Analyzer.facade.registeredRules) {
for (var incompatibleRule in rule.incompatibleRules) {
test(, () async {
var referencedRule = Analyzer.facade.registeredRules
.firstWhere((r) => == incompatibleRule);
expect(referencedRule, isNotNull,
'No rule found for id: $incompatibleRule (check for typo?)');
expect(referencedRule.incompatibleRules, contains(,
'$referencedRule should define ${} in `incompatibleRules` but does not.');