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 — [apex] New rule NcssCount to replace old Ncss*Count rules by adangel · Pull Request #6198 · pmd/pmd

Conversation

@adangel

@adangel adangel commented Oct 31, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Describe the PR

  • Implemented the metric Ncss for Apex as well, similar to the Java implementation
  • new rule NcssCount
  • deprecate the old rules

Related issues

  • Fix [apex] Merge NCSS count rules for Apex #2128

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adangel added 9 commits October 31, 2025 16:12
@adangel
[apex] Add NCSS metric
ac4121f
@adangel
[apex] NCSS metric javadoc
54e203e
@adangel
[apex] New rule: NcssCount
2ac1acb
@adangel
[apex] Report limit for NcssCount
0f5a910
@adangel
[apex] Deprecate rule ExcessiveClassLength
bffe199
@adangel
[apex] Deprecate rules NcssConstructorCount, NcssMethodCount, NcssTyp…
cf32688
…eCount
@adangel
[apex] Update quickstart.xml: use NcssCount
a18d68a
Remove now deprecated rules.
@adangel
[apex] Deprecate ASTStatement
3062628
The node ASTStatement is not used and doesn't appear in the tree.
@adangel
[doc] Update release notes (pmd#2128)
8cb62cc
@adangel adangel added this to the 7.19.0 milestone Oct 31, 2025
@adangel adangel added a:new-rule Proposal to add a new built-in rule is:deprecation The main focus is deprecating public APIs or rules, eg to make them internal, or removing them labels Oct 31, 2025
@pmd-actions-helper

pmd-actions-helper Bot commented Oct 31, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 2 new violations, 0 new errors and 0 new configuration errors,
removes 6 violations, 0 errors and 0 configuration errors.

Regression Tester Report

(comment created at 2025-11-13 15:07:51+00:00 for 50b368f)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adangel added 6 commits October 31, 2025 20:12
@adangel
[apex] NcssCount: Adjust default values
4c7a988
Use the same limits as the old rules.
NcssMethodCount used 40, NcssTypeCount used 500.
Note: ExcessiveClassLength used 1000 and NcssConstructorCount used 20.
@adangel
[apex] NcssCount: Adjust messages
8f186c0
@adangel
[apex] NcssMetric: fix documentation about try/catch/finally
a1a3b59
@adangel
[java] NcssMetric: fix documentation about try/catch/finally
d0cc550
@adangel
[apex] NcssMetric: test case to show differences to old rules
65aa5c4
@adangel
[apex] NcssMetric: javadoc since
77ed98d
adangel
adangel commented Nov 7, 2025
View reviewed changes
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/metrics/ApexMetrics.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

adangel
adangel commented Nov 13, 2025
View reviewed changes
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/design/NcssCountRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

adangel
adangel commented Nov 13, 2025
View reviewed changes
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/design/NcssCountRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@adangel adangel mentioned this pull request Nov 13, 2025
[plsql] New rule NcssCount to replace old Ncss*Count rules #6214
Merged
10 tasks done
adangel
adangel commented Nov 13, 2025
View reviewed changes
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/design/NcssTypeCountRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

adangel added 4 commits November 13, 2025 15:45
@adangel
[apex] Deprecate old rule tests
e0ed2b9
@adangel
[apex] Register NCSS metric
f545bce
@adangel
[apex] Remove unneeded cast in NcssCountRule
628ff80
@adangel
[doc] Update release notes (pmd#6198)
50b368f
@adangel adangel self-assigned this Nov 27, 2025
@adangel

adangel commented Nov 27, 2025

Copy link
Copy Markdown
Member Author

I'm going to merge this for 7.19.0, assuming this is ok.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel
adangel merged commit 54b9ac9 into pmd:main Nov 27, 2025
@adangel
adangel deleted the apex/issue-2128-ncss branch November 27, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adangel adangel

Labels

a:new-rule Proposal to add a new built-in rule is:deprecation The main focus is deprecating public APIs or rules, eg to make them internal, or removing them

Projects

None yet

Milestone

7.19.0

Development

Successfully merging this pull request may close these issues.

[apex] Merge NCSS count rules for Apex

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@adangel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.