dart-archive / angular_analyzer_plugin

WORK MOVED TO dart-lang/angular repository
https://github.com/dart-lang/angular/tree/master/angular_analyzer_plugin
68 stars 13 forks source link

No warning shown for duplicate attributes such as 'class' #648

Open ghost opened 5 years ago

ghost commented 5 years ago

This component template doesn't show any warning while editing:

<material-button class="use-session-btn" class="blue">Use</material-button>

During compile time we see this error: ParseErrorLevel.FATAL: Found multiple attributes with the same name: class.

MichaelRFairhurst commented 5 years ago

Thanks for filing!

You're right. Our old parser would reject this before we even started to analyze, so we never implemented this. On the new parser, it'd be a really good & easy thing to catch!