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 — [java] NPathComplexity should mention the expected NPath complexity · Issue #2570 · pmd/pmd

[java] NPathComplexity should mention the expected NPath complexity #2570

New issue
Copy link
New issue
Copy link
Closed
#2593
Closed
[java] NPathComplexity should mention the expected NPath complexity#2570
#2593
Copy link
Labels
an:enhancementAn improvement on existing features / rules
Milestone
6.25.0

Description

@DaDummy
DaDummy
opened on Jun 9, 2020
Issue body actions

Affects PMD Version: 6.13.0 (m-pmd-p 3.12.0)

Rule: NPathComplexity

Description:

The PMD error message reports the current NPath complexity of the method, but fails to mention what the limit is that the developer needs to reach in order for the failure to disappear.

Example:

PMD Failure: com.example.SomeClass:265 Rule:NPathComplexity Priority:3 The method 'doWork(Object, List)' has an NPath complexity of 900.

Running PMD through: Maven

Reacted by Linus Fernandes

Activity

  1. DaDummy
    added
    a:bugPMD crashes or fails to analyse a file.
    on Jun 9, 2020
  2. adangel
    added
    an:enhancementAn improvement on existing features / rules
    and removed
    a:bugPMD crashes or fails to analyse a file.
    on Jun 9, 2020
  3. adangel
    changed the title [-][java] NPathComplexity fails to mention the expected NPath complexity[/-] [+][java] NPathComplexity should mention the expected NPath complexity[/+] on Jun 9, 2020
  4. adangel commented on Jun 9, 2020

    @adangel
    adangel
    on Jun 9, 2020
    Member
    More actions

    This sounds like a useful enhancement to the rule.

    It should be easy to add the value of reportLevel into the violation message here:

    pmd/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/NPathComplexityRule.java

    Lines 80 to 81 in bc4a1d6

    addViolation(data, node, new String[] {node instanceof ASTMethodDeclaration ? "method" : "constructor",
    PrettyPrintingUtil.displaySignature(node), "" + npath, });

  5. adangel
    added
    good first issueA great starting point for new contributors
    help-wanted
    on Jun 9, 2020
  6. KroArtem
    added a commit that references this issue on Jun 14, 2020

    fix issue pmd#2570, add information about expected NPath complexity t…

    5706dbc
  7. adangel
    added
    has:pr
    on Jun 18, 2020
  8. adangel
    added this to the 6.25.0 milestone on Jun 18, 2020
  9. adangel
    removed
    good first issueA great starting point for new contributors
    help-wanted
    on Jun 18, 2020
  10. adangel
    closed this as completedin #2593on Jun 18, 2020
  11. adangel
    added a commit that references this issue on Jun 18, 2020

    [doc] Update release notes, fixes #2570, refs #2593

    This issue will close once commit 186355c is merged into the 'main' branch.
    186355c
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 / rules

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.25.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.