GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] Text renderer should include name of violated rule · Issue #1961 · pmd/pmd

[core] Text renderer should include name of violated rule #1961

New issue
Copy link
New issue
Copy link
Closed
#2914
Closed
[core] Text renderer should include name of violated rule#1961
#2914
Copy link
Labels
an:enhancementAn improvement on existing features / rulesgood first issueA great starting point for new contributors
Milestone
6.30.0

Description

@linusjf
linusjf
opened on Aug 4, 2019
Issue body actions

Affects PMD Version:
6.16.0, 6.17.0

Description:
Error messages generated in text output do not reference the name of the rule violated. Without it, it's hard to find documentation on how to resolve the error. The rule name is needed for the SuppressWarnings annotation.

Running PMD through: [CLI | Ant]

Activity

  1. jsotuyod
    changed the title [-][Java] Errror messages must include name of rule violated. [/-] [+][core] Text renderer doesn't include name of violated rule[/+] on Aug 18, 2019
  2. jsotuyod
    added
    an:enhancementAn improvement on existing features / rules
    on Aug 18, 2019
  3. linusjf commented on Nov 24, 2019

    @linusjf
    linusjf
    on Nov 24, 2019
    Author
    More actions

    The SuppressWarnings annotation requires the full name of the rule like PMD.RuleName or RuleName.
    Are there any plans to simply allow regex-like prefix and let PMD's implementation decide which rule is referenced?
    Ambiguities are to be flagged, of course, and rejected.

  4. jsotuyod
    added
    good first issueA great starting point for new contributors
    on Dec 9, 2019
  5. linusjf commented on May 21, 2020

    @linusjf
    linusjf
    on May 21, 2020
    Author
    More actions

    This would be a good issue to be fixed as well.

    If this change request is not to be implemented, is it a better idea to have the documentation provide the text of the violation messages? Either way, the purpose will be served. The rules can then be searched for and located more easily.

  6. GuntherSchrijvers commented on Nov 12, 2020

    @GuntherSchrijvers
    GuntherSchrijvers
    on Nov 12, 2020
    Contributor
    More actions

    Hello @Fernal73 ,

    How would the output need to look like?
    Would this be ok?
    SourceCodeFileName:LineNumber:<TAB>RuleName:<TAB>RuleDescription

  7. linusjf commented on Nov 12, 2020

    @linusjf
    linusjf
    on Nov 12, 2020
    Author
    More actions

    Hello @Fernal73 ,

    How would the output need to look like?
    Would this be ok?
    SourceCodeFileName:LineNumber:<TAB>RuleName:<TAB>RuleDescription

    SourceCodeFileName:LineNumber:<TAB>RuleDescription:<TAB>RuleName
    to maintain compatibility in case this output is parsed by any programs. The RuleDescription would be the same as currently output.

  8. GuntherSchrijvers commented on Nov 12, 2020

    @GuntherSchrijvers
    GuntherSchrijvers
    on Nov 12, 2020
    Contributor
    More actions

    Ok, thank you for the feedback,

  9. oowekyala
    added this to the 6.30.0 milestone on Nov 12, 2020
  10. linusjf commented on Nov 12, 2020

    @linusjf
    linusjf
    on Nov 12, 2020
    Author
    More actions

    Ok, thank you for the feedback,

    It would have helped if you had informed me that you were concerned about field alignment. That's a legitimate reason to retain your original format. I don't see any backward compatibility use, either.

  11. GuntherSchrijvers commented on Nov 12, 2020

    @GuntherSchrijvers
    GuntherSchrijvers
    on Nov 12, 2020
    Contributor
    More actions

    Hello @Fernal73,

    I hadn't considered the field alignment, It is only thanks to the feedback of @oowekyala on the pull request that this was taken into consideration.

  12. linusjf commented on Nov 12, 2020

    @linusjf
    linusjf
    on Nov 12, 2020
    Author
    More actions

    Thanks, @oowekyala @GuntherSchrijvers !

  13. adangel
    changed the title [-][core] Text renderer doesn't include name of violated rule[/-] [+][core] Text renderer should include name of violated rule[/+] on Nov 23, 2020
  14. adangel
    closed this as completedin 7d82cecon Nov 23, 2020
  15. rmohan20
    added a commit that references this issue on Dec 15, 2020

    Pulling latest changes from pmd/pmd: 12/15/2020 (#1)

    This issue will close once commit 62c9b8f is merged into the 'master' branch.
    62c9b8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancementAn improvement on existing features / rulesgood first issueA great starting point for new contributors

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.30.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.