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

Is there a way to suppress warnings in FlexPMD?

New Here ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

In PMD there is the @SuppressWarnings java annotation that can be used to suppress all or individual warnings in a class. Is there anything similar that can be added in an AS or MXML file with FlexPMD?

TOPICS
FlexPMD

Views

5.9K

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

correct answers 1 Correct answer

Adobe Employee , Sep 22, 2009 Sep 22, 2009

So there is a way to suppress one or all violations in a given line by appending // NO PMD or // NO PMD ruleName

There is no way at the moment to ignore every violation at a class level, or function level using metadata.

Feel free to add a feature request if you think it is needed.

Xavier

Votes

Translate

Translate
Adobe Employee ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

So there is a way to suppress one or all violations in a given line by appending // NO PMD or // NO PMD ruleName

There is no way at the moment to ignore every violation at a class level, or function level using metadata.

Feel free to add a feature request if you think it is needed.

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
New Here ,
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

Thanks Xavier. That worked well.

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 ,
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

Glad to hear that.

To be more accurate, // NO PMD ruleName has been added in Rc4, that has been released today

Cheers,

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 ,
Dec 14, 2009 Dec 14, 2009

Copy link to clipboard

Copied

FlexPMD is giving me a warning "adobe.ac.pmd.rules.performance.CreationPolicySetToAll" in an <mxml:Application> declaration. Is there a way to suppress this warning, or am I out of luck?

Thanks -

Marc

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 ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

Can you attach an example?

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
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Xavier,

I am seeing tons of warning messages as under. I am using ANT target to invoke FlexPMD. Can you suggest a way I can hide these messages ? I did //NO PMD for all our rules ...

[flexPmd] WARNING: Open quote is expected for attribute "type" associated with an  element type  "node". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  [flexPmd] May 6, 2010 10:49:44 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: The markup in the document preceding the root element must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  [flexPmd] May 6, 2010 10:49:44 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: Open quote is expected for attribute "label" associated with an  element type  "workItems". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  [flexPmd] May 6, 2010 10:49:44 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: Open quote is expected for attribute "type" associated with an  element type  "nodes". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  [flexPmd] May 6, 2010 10:49:44 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: Open quote is expected for attribute "type" associated with an  element type  "nodes". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  [flexPmd] May 6, 2010 10:49:44 AM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: Open quote is expected for attribute "type" associated with an  element type  "nodes". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

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 ,
May 08, 2010 May 08, 2010

Copy link to clipboard

Copied

This warning has been removed.

Cheers,

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
New Here ,
Mar 24, 2011 Mar 24, 2011

Copy link to clipboard

Copied

LATEST

In the current release of FlexPMD is there a way to suppress errors/warnings on the class level yet?

Thanks,

Borek

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