1

I'm trying to declare a customized ManagedEvent with ActionScript as follows:

[Bindable]  
[ManagedEvents(names="message")]
public class ClassName extends EventDispatcher
{
  .........
 }

The problem came when sonar impposed to have a companion Event with that ManagedEvents.

I added the following Event metadata :

[Bindable]
[Event(name="message",type="package.ClassEvent")]
[ManagedEvents(names="message")]
public class ClassName extends EventDispatcher
{
  ....    
 }

But the problem still unsolved with sonar.

This is a link for sonar SonarAnalyzer for flex : http://dist.sonarsource.com/reports/coverage/rules/flex_rules_coverage.html

where there is this rule : https://sonarqube.com/coding_rules#rule_key=flex%3AS1464

Each ManagedEvents metadata tag should have a companion Event metadata tag

I really need to fix this issue, have you an idea?

Selma BA
  • 149
  • 3
  • 18

1 Answers1

1

The problem was solved by removing the names attribut in ManagedEvents:

[Bindable]
[Event(name="message",type="package.ClassEvent")]
[ManagedEvents("message")]
public class ClassName extends EventDispatcher
{
  ....    
 }
Selma BA
  • 149
  • 3
  • 18