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

common-workflow-language / cwlviewer / #1997

13 May 2026 05:20PM UTC coverage: 70.25% (-0.08%) from 70.334%
#1997

Pull #751

github

kinow
Undo code deletion, but replace string concatenation by log+parameters
Pull Request #751: Bump org.springframework.boot:spring-boot-starter-parent from 3.1.4 to 4.1.0-RC1

119 of 196 new or added lines in 32 files covered. (60.71%)

20 existing lines in 4 files now uncovered.

1712 of 2437 relevant lines covered (70.25%)

0.7 hits per line

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

87.5
/src/main/java/org/commonwl/view/docker/DockerService.java
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements.  See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership.  The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19

20
package org.commonwl.view.docker;
21

22
import java.util.regex.Matcher;
23
import java.util.regex.Pattern;
24

25
/** Handles DockerHub functionality */
UNCOV
26
public class DockerService {
×
27

28
  // URL validation for docker pull id
29
  private static final String DOCKERHUB_ID_REGEX =
30
      "^([0-9a-z]{4,30})(?:\\/([a-zA-Z0-9_-]+))?(?:\\:[a-zA-Z0-9_-]+)?$";
31
  private static final Pattern dockerhubPattern = Pattern.compile(DOCKERHUB_ID_REGEX);
1✔
32

33
  /**
34
   * Get a DockerHub URL from a dockerPull ID
35
   *
36
   * @param dockerPull The repository and ID as a string
37
   * @return A docker hub link
38
   */
39
  public static String getDockerHubURL(String dockerPull) {
40
    Matcher m = dockerhubPattern.matcher(dockerPull);
1✔
41
    if (m.find()) {
1✔
42
      if (m.group(2) == null) {
1✔
43
        return "https://hub.docker.com/r/_/" + m.group(1);
1✔
44
      } else {
45
        return "https://hub.docker.com/r/" + m.group(1) + "/" + m.group(2);
1✔
46
      }
47
    }
48
    return null;
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