• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Cannot suppress a specific violation

Explorer ,
Nov 27, 2009 Nov 27, 2009

Copy link to clipboard

Copied

Hi,

I downloaded RC5 and tried to suppress a specific violation but it didn't work.

Please see ticket FLEXPMD-88 for detailed information. The status of the ticket is "Closed/Fixed" however the problem is still there.

I have two questions...

1. What exactly the syntax is to suppress a specific violation?

I tried 4 ways but none of them suppresses the mentioned violation. In fact all of them suppress all violations. These are the 4 ways I tried this feature:

// NO PMD AlertShow
// NO PMD AlertShowRule
// NO PMD com.adobe.ac.pmd.rules.maintanability.AlertShow
// NO PMD com.adobe.ac.pmd.rules.maintanability.AlertShowRule

2. How should we proceed with the ticket related to this problem? Do we reopen the old ticket or create a copy of it?

I believe the old ticket FLEXPMD-88 should be reopen mentioning that the issue is still present in RC5 because this ticket is in the list of RC5 changes. The point is not to stress that an issue was not properly solved in RC5 but to keep the RC5 state transparent to all people who may use it. They may go through the RC5 change list and see that FLEXPMD-88 was closed/fixed and if we create another ticket they won't immediately get the information that suppressing a specific violation is still open.


Unfortunately I cannot reopen the old ticket. Probably an Adobe employee can so I will expect your answer before doing anything in JIRA.

Thanks

TOPICS
FlexPMD

Views

673

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 27, 2009 Nov 27, 2009

Copy link to clipboard

Copied

I reopened the issue.

You are right. It does not work as expected. I will fix it and smoke test it.

Thanks

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 27, 2009 Nov 27, 2009

Copy link to clipboard

Copied

Are you using Maven or Ant?

If you use Maven, I will publish the snapshot artifacts with the fix in place.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 27, 2009 Nov 27, 2009

Copy link to clipboard

Copied

Hi Xavier,

Thanks for the quick reaction to the issue!

Currently there are a lot of places in the source code where suppressing is needed and a fix earlier than the next RC would make the FlexPMD reports defintely more meaningful. This would be really appreciated!

I invoke FlexPMD as a command-line tool. It is not integrated neither in Ant script nor Maven.

A few remarks to the possible fix:

1. Please make it somehow clear what the exact syntax is. In the bug I mentioned 4 ways to suppress a violation but I still don't know which is the right one. Probably all are wrong.

2.  Suppressing by // NO PMD <RuleName> must not lead to suppressing all violations in case the <RuleName> doesn't match existing rule name. This is important because in case a rule name changes from a version to version or the developer enters wrong rule name they should not get suppressing for all violations. This would happen silently to them and it may lead to hiding other problems. In case it is a wrong rule name then nothing should be suppressed.

3. FlexPMD should trace during parsing what exactly gets suppressed and at which line number. This will keep developers and the tool on the same page.

Thanks a lot for your hard work!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 27, 2009 Nov 27, 2009

Copy link to clipboard

Copied

LATEST

1. The four ways you mentioned are now working. They were supposed to work in RC5, but it did not as you noticed. It is now fixed and unit-tested against trunk. It will be in the next release which will happen soon.

2. That's the way it is now working.

3. Good idea. I will add it.

Thanks again for your report.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines