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

Camelcade / Perl5-IDEA / #525521732

12 Dec 2025 04:35AM UTC coverage: 75.905% (-0.03%) from 75.932%
#525521732

push

github

hurricup
Bump JetBrains/qodana-action from 2025.2.3 to 2025.2.4

Bumps [JetBrains/qodana-action](https://github.com/jetbrains/qodana-action) from 2025.2.3 to 2025.2.4.
- [Release notes](https://github.com/jetbrains/qodana-action/releases)
- [Commits](https://github.com/jetbrains/qodana-action/compare/v2025.2.3...v2025.2.4)

---
updated-dependencies:
- dependency-name: JetBrains/qodana-action
  dependency-version: 2025.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

14743 of 22633 branches covered (65.14%)

Branch coverage included in aggregate %.

31068 of 37720 relevant lines covered (82.36%)

0.82 hits per line

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

90.74
/plugin/common/src/main/java/com/perl5/lang/pod/parser/PodParserUtil.java
1
/*
2
 * Copyright 2015-2025 Alexandr Evstigneev
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.perl5.lang.pod.parser;
18

19
import com.intellij.lang.PsiBuilder;
20
import com.intellij.lang.parser.GeneratedParserUtilBase;
21
import com.intellij.openapi.util.NlsContexts.ParsingError;
22
import com.intellij.psi.tree.IElementType;
23
import com.perl5.lang.pod.lexer.PodTokenSetsEx;
24
import org.jetbrains.annotations.NotNull;
25

26
import static com.perl5.lang.pod.parser.PodElementTypesGenerated.*;
27

28

29
public class PodParserUtil extends GeneratedParserUtilBase {
×
30
  @SuppressWarnings({"StaticMethodOnlyUsedInOneClass", "SameReturnValue"})
31
  public static boolean completeOrReport(@NotNull PsiBuilder b,
32
                                         int ignoredL,
33
                                         @NotNull IElementType targetElement,
34
                                         @NotNull @ParsingError String message) {
35
    if (b.getTokenType() == targetElement) {
1✔
36
      b.advanceLexer();
1✔
37
      return true;
1✔
38
    }
39
    PsiBuilder.Marker marker = b.mark();
1✔
40
    while (!b.eof() && b.getTokenType() != targetElement && b.getTokenType() != POD_NEWLINE) {
1!
41
      b.advanceLexer();
×
42
    }
43
    marker.error(message);
1✔
44
    b.advanceLexer();
1✔
45
    return true;
1✔
46
  }
47

48
  @SuppressWarnings({"UnusedReturnValue", "StaticMethodOnlyUsedInOneClass"})
49
  public static boolean checkAndConvert(@NotNull PsiBuilder b,
50
                                        int ignoredL,
51
                                        @NotNull IElementType sourceType,
52
                                        @NotNull IElementType ignoredTargetType) {
53
    if (b.getTokenType() == sourceType) {
1✔
54
      PsiBuilder.Marker m = b.mark();
1✔
55
      b.advanceLexer();
1✔
56
      m.collapse(POD_INDENT_LEVEL);
1✔
57
      return true;
1✔
58
    }
59
    return false;
1✔
60
  }
61

62

63
  @SuppressWarnings("StaticMethodOnlyUsedInOneClass")
64
  public static boolean collapseNonSpaceTo(@NotNull PsiBuilder b, int ignoredL, @NotNull IElementType targetElement) {
65
    IElementType tokenType = b.getTokenType();
1✔
66

67
    if (tokenType == POD_IDENTIFIER) {
1✔
68
      PsiBuilder.Marker m = b.mark();
1✔
69
      while (!b.eof() && !PodTokenSetsEx.ALL_WHITE_SPACES.contains(b.rawLookup(1))) {
1✔
70
        b.advanceLexer();
1✔
71
      }
72
      b.advanceLexer();
1✔
73
      m.collapse(targetElement);
1✔
74
      return true;
1✔
75
    }
76
    return false;
1✔
77
  }
78

79
  @SuppressWarnings({"StaticMethodOnlyUsedInOneClass", "SameReturnValue"})
80
  public static boolean parsePodSectionContent(@NotNull PsiBuilder b,
81
                                               int ignoredL,
82
                                               @NotNull IElementType stopToken,
83
                                               @NotNull IElementType targetToken,
84
                                               @ParsingError String errorMessage) {
85
    PsiBuilder.Marker m = b.mark();
1✔
86
    while (!b.eof() && b.getTokenType() != stopToken) {
1✔
87
      b.advanceLexer();
1✔
88
    }
89

90
    m.done(targetToken);
1✔
91

92
    if (b.eof()) {
1✔
93
      b.mark().error(errorMessage);
1✔
94
    }
95

96
    return true;
1✔
97
  }
98
}
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

© 2025 Coveralls, Inc