dart-archive/angular_analyzer_plugin

Providing duplicate directives, style URLs and providers doesn't show any warning

Opened this issue · 1 comments

import 'package:angular/angular.dart';
import 'package:angular_components/angular_components.dart';

@Component(
    selector: 'example-comp',
    templateUrl: 'example_comp.html',
    directives: const [
      MaterialToggleComponent,
      MaterialToggleComponent, // no warning
    ],
    styleUrls: const [
      'example_comp.scss.css',
      'example_comp.scss.css' // no warning
    ],
    providers: [
      popupBindings,
      popupBindings, // no warning
    ],
    exports: [
      ModalComponent,
      ModalComponent,// shows warning
    ])
class ExampleComp{
}

In above example providing duplicate directives, style URLs and providers doesn't show any warning.
Warnings are shown only for duplicate values in exports field.

This is a great feature request to detect this, thanks!! Absolutely would be useful, and shouldn't be too difficult either.

Thanks for filing and for the detailed example!