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

pmd / pmd / 503

08 May 2026 10:01AM UTC coverage: 79.056% (-0.005%) from 79.061%
503

push

github

adangel
[core] Fix #4972: Update antlr from 4.9.3 to 4.13.2 (#6621)

18783 of 24681 branches covered (76.1%)

Branch coverage included in aggregate %.

40922 of 50841 relevant lines covered (80.49%)

0.81 hits per line

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

87.5
/pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNameDictionary.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.lang.swift.ast;
6

7
import org.antlr.v4.runtime.Vocabulary;
8
import org.apache.commons.lang3.StringUtils;
9
import org.checkerframework.checker.nullness.qual.Nullable;
10

11
import net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrNameDictionary;
12

13

14
final class SwiftNameDictionary extends AntlrNameDictionary {
15

16
    SwiftNameDictionary(Vocabulary vocab, String[] ruleNames) {
17
        super(vocab, ruleNames);
1✔
18
    }
1✔
19

20
    @Override
21
    protected @Nullable String nonAlphaNumName(String name) {
22
        { // limit scope of 'sup', which would be null outside of here anyway
23
            String sup = super.nonAlphaNumName(name);
1✔
24
            if (sup != null) {
1✔
25
                return sup;
1✔
26
            }
27
        }
28

29
        if (name.charAt(0) == '#' && StringUtils.isAlphanumeric(name.substring(1))) {
1!
30
            return "directive-" + name.substring(1);
1✔
31
        }
32

33
        switch (name) {
1!
34
        case "unowned(safe)": return "unowned-safe";
1✔
35
        case "unowned(unsafe)": return "unowned-unsafe";
1✔
36
        case "getter:": return "getter";
1✔
37
        case "setter:": return "setter";
1✔
38
        default: return null;
×
39
        }
40
    }
41
}
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