• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pmd / pmd / 218

24 Oct 2025 01:23PM UTC coverage: 78.676% (-0.007%) from 78.683%
218

push

github

web-flow
[plsql] Excessive*/Ncss*Count/NPathComplexity include the metric (#6077)

18267 of 24067 branches covered (75.9%)

Branch coverage included in aggregate %.

8 of 11 new or added lines in 5 files covered. (72.73%)

2 existing lines in 1 file now uncovered.

39803 of 49742 relevant lines covered (80.02%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.92
/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/design/NcssObjectCountRule.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.lang.plsql.rule.design;
6

7
import net.sourceforge.pmd.lang.plsql.ast.ASTGlobal;
8
import net.sourceforge.pmd.lang.plsql.ast.ASTProgramUnit;
9
import net.sourceforge.pmd.lang.plsql.ast.OracleObject;
10

11
/**
12
 * Non-commented source statement counter for Oracle Object declarations.
13
 *
14
 * @author Stuart Turton
15
 */
16
public class NcssObjectCountRule extends AbstractNcssCountRule<OracleObject> {
17

18
    /**
19
     * Count type declarations. This includes Oracle Objects.
20
     */
21
    public NcssObjectCountRule() {
22
        super(OracleObject.class);
1✔
23
    }
1✔
24

25
    @Override
26
    protected int defaultReportLevel() {
27
        return 1500;
1✔
28
    }
29

30
    @Override
31
    protected boolean isIgnored(OracleObject node) {
32
        // Treat Schema-level ProgramUnits as Oracle Objects, otherwise as
33
        // subprograms
34
        return node instanceof ASTProgramUnit && !(node.getParent() instanceof ASTGlobal);
1!
35
    }
36

37
    @Override
38
    protected Object[] getViolationParameters(OracleObject node, int metric, int limit) {
39
        String name = node.getObjectName();
1✔
40
        return new Object[] {name == null ? "(unnamed)" : name, metric, limit};
1!
41
    }
42

43
    /**
44
     * @deprecated Since 7.18.0. Use {@link #getViolationParameters(OracleObject, int, int)} instead.
45
     */
46
    @Deprecated
47
    protected Object[] getViolationParameters(OracleObject node, int metric) {
NEW
48
        return getViolationParameters(node, metric, -1);
×
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc