anchor.diff:        packageConfigPath = null;
       }
   
  -    LinterOptions options = new LinterOptions([rule])
  +    LinterOptions options = new LinterOptions([rule], analysisOptions)
         ..mockSdk = new MockSdk(memoryResourceProvider)
         ..resourceProvider = resourceProvider
         ..packageConfigPath = packageConfigPath;
  
positive.code: }
  
  final String ruleDir = p.join('test', 'rules');
  
  /// Rule tests
  defineRuleTests() {
    // TODO: if ruleDir cannot be found print message to set CWD to project root
    group('rule', () {
      group('dart', () {
        for (var entry in new Directory(ruleDir).listSync()) {
          if (entry is! File || !isDartFile(entry)) continue;
          var ruleName = p.basenameWithoutExtension(entry.path);
          testRule(ruleName, entry, debug: true);
        }
      });
      group('pub', () {
        for (var entry in new Directory(p.join(ruleDir, 'pub')).listSync()) {
  
negative.code:   values.forEach((s) => test('"$s"', () => expect(f(s), m)));
  }
  
  testRules(String ruleDir, {String analysisOptions}) {
    for (var entry in new Directory(ruleDir).listSync()) {
      if (entry is! File || !isDartFile(entry)) continue;
      var ruleName = p.basenameWithoutExtension(entry.path);
      testRule(ruleName, entry, debug: true, analysisOptions: analysisOptions);
    }
  }
  
  testRule(String ruleName, File file,
      {bool debug = false, String analysisOptions}) {
    registerLintRules();
  
    test('$ruleName', () async {
  