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

Camelcade / Perl5-IDEA / #525521703

09 Nov 2025 10:57AM UTC coverage: 75.97% (+0.06%) from 75.91%
#525521703

push

github

hurricup
Safer work with variable name

14772 of 22647 branches covered (65.23%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

89 existing lines in 10 files now uncovered.

31098 of 37732 relevant lines covered (82.42%)

0.82 hits per line

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

70.37
/plugin/coverage/src/main/java/com/perl5/lang/perl/coverage/PerlCoverageProfileState.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.CoverageHelper;
20
import com.intellij.execution.ExecutionException;
21
import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration;
22
import com.intellij.execution.runners.ExecutionEnvironment;
23
import com.intellij.openapi.application.ApplicationManager;
24
import com.intellij.openapi.diagnostic.Logger;
25
import com.intellij.openapi.projectRoots.Sdk;
26
import com.intellij.openapi.util.io.FileUtil;
27
import com.perl5.lang.perl.idea.run.GenericPerlRunConfiguration;
28
import com.perl5.lang.perl.idea.run.PerlRunProfileState;
29
import com.perl5.lang.perl.idea.sdk.host.PerlHostData;
30
import org.jetbrains.annotations.NotNull;
31

32
import java.io.File;
33
import java.util.Collections;
34
import java.util.List;
35

36
public class PerlCoverageProfileState extends PerlRunProfileState {
37
  private static final Logger LOG = Logger.getInstance(PerlCoverageProfileState.class);
1✔
38
  public PerlCoverageProfileState(ExecutionEnvironment environment) {
39
    super(environment);
1✔
40
  }
1✔
41

42
  @Override
43
  public @NotNull List<String> getAdditionalPerlArguments(@NotNull GenericPerlRunConfiguration perlRunConfiguration)
44
    throws ExecutionException {
45
    CoverageHelper.resetCoverageSuit(perlRunConfiguration);
1✔
46

47
    String coverageBasePath =
1✔
48
      CoverageEnabledConfiguration.getOrCreate((GenericPerlRunConfiguration)getEnvironment().getRunProfile()).getCoverageFilePath();
1✔
49

50
    if (coverageBasePath == null) {
1!
UNCOV
51
      throw new ExecutionException(
×
UNCOV
52
        PerlCoverageBundle.message("dialog.message.unable.to.create.coverage.directory.for", perlRunConfiguration));
×
53
    }
54

55
    File coverageDir = new File(coverageBasePath);
1✔
56
    coverageDir.mkdirs();
1✔
57
    LOG.debug("Coverage directory created: ", coverageDir);
1✔
58

59
    Sdk effectiveSdk = perlRunConfiguration.getEffectiveSdk();
1✔
60
    PerlHostData<?, ?> hostData = PerlHostData.notNullFrom(effectiveSdk);
1✔
61
    var remoteDataPath = FileUtil.toSystemIndependentName(hostData.getRemotePath(coverageBasePath));
1✔
62
    if (ApplicationManager.getApplication().isUnitTestMode()) {
1!
63
      return Collections.singletonList("-MDevel::Cover=-db," + remoteDataPath + ",-dir,.,-blib,0");
1!
64
    }
UNCOV
65
    return Collections.singletonList("-MDevel::Cover=-silent,1,-db," + remoteDataPath + ",-dir,.,-blib,0");
×
66
  }
67

68
  @Override
69
  public boolean isParallelRunAllowed() {
70
    return false;
1✔
71
  }
72
}
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