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

Camelcade / Perl5-IDEA / #525521576

05 Jun 2025 06:17AM UTC coverage: 82.298% (-0.02%) from 82.318%
#525521576

push

github

hurricup
Localized strings and improved annotations

26 of 41 new or added lines in 19 files covered. (63.41%)

22 existing lines in 6 files now uncovered.

30837 of 37470 relevant lines covered (82.3%)

0.82 hits per line

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

33.33
/plugin/coverage/src/main/java/com/perl5/lang/perl/coverage/PerlCoverageAnnotator.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.perl.coverage;
18

19
import com.intellij.coverage.SimpleCoverageAnnotator;
20
import com.intellij.openapi.project.Project;
21
import org.jetbrains.annotations.NotNull;
22
import org.jetbrains.annotations.Nullable;
23

24
import java.io.File;
25

26
public class PerlCoverageAnnotator extends SimpleCoverageAnnotator {
27
  public PerlCoverageAnnotator(Project project) {
28
    super(project);
1✔
29
  }
1✔
30

31
  public static @NotNull PerlCoverageAnnotator getInstance(@NotNull Project project) {
32
    return project.getService(PerlCoverageAnnotator.class);
1✔
33
  }
34

35
  @Override
36
  protected @Nullable FileCoverageInfo fillInfoForUncoveredFile(@NotNull File file) {
37
    return new FileCoverageInfo();
1✔
38
  }
39

40
  @Override
41
  protected @Nullable String getLinesCoverageInformationString(@NotNull FileCoverageInfo info) {
42
    if (info.totalLineCount == 0) {
×
43
      return null;
×
44
    }
45
    if (info.coveredLineCount == 0) {
×
NEW
46
      return info instanceof DirCoverageInfo ? null : PerlCoverageBundle.message("no.lines.covered");
×
47
    }
NEW
48
    return PerlCoverageBundle.message("0.lines.covered", (int)((double)info.coveredLineCount * 100. / (double)info.totalLineCount));
×
49
  }
50

51
  @Override
52
  protected @Nullable String getFilesCoverageInformationString(@NotNull DirCoverageInfo info) {
53
    if (info.totalFilesCount == 0 || info.coveredFilesCount == 0) {
×
54
      return null;
×
55
    }
NEW
56
    return PerlCoverageBundle.message("0.of.1.files", info.coveredFilesCount, info.totalFilesCount);
×
57
  }
58
}
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