Skip to content

Commit e433fd5

Browse files
Vishal VaibhavGitHub Enterprise
authored andcommitted
refactor module name as per oss standards (#29)
* refactor module name as per oss standards * make lint * removed unneccesary folder
1 parent da654b0 commit e433fd5

25 files changed

Lines changed: 148 additions & 169 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ coverage.xml
55
vendor/
66
/plugin
77
pull-request-code-coverage
8+
bin

.vela.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ steps:
4949
- pull_request
5050

5151
- name : check-lint-on-pr
52-
image: golangci/golangci-lint
52+
image: hub.docker.target.com/golang:1.17
5353
pull: true
5454
commands:
55-
- golangci-lint run
55+
- make lint
5656
ruleset:
5757
event:
5858
- pull_request

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ GO_PKGS=$(shell go list ./... | grep -v -e "/resources")
33

44
format: check-gofmt
55

6+
67
check-gofmt:
78
@echo "Checking formatting..."
89
@FMT="0"; \
@@ -18,4 +19,12 @@ check-gofmt:
1819
exit 1; \
1920
else \
2021
echo "Success - way to run gofmt!"; \
21-
fi
22+
fi
23+
24+
bin/golangci-lint:
25+
mkdir -p bin
26+
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.24.0
27+
28+
.PHONY: lint
29+
lint: bin/golangci-lint
30+
bin/golangci-lint run ./...

bin/lint.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module git.target.com/searchoss/pull-request-code-coverage
1+
module git.target.com/target/pull-request-code-coverage
22

33
go 1.17
44

internal/plugin/calculator/calculator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package calculator
22

33
import (
4-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/coverage"
5-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/domain"
4+
"git.target.com/target/pull-request-code-coverage/internal/plugin/coverage"
5+
"git.target.com/target/pull-request-code-coverage/internal/plugin/domain"
66
"github.com/sirupsen/logrus"
77
)
88

internal/plugin/coverage/cobertura/report.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"os"
1010
"strings"
1111

12-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/coverage"
13-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/domain"
12+
"git.target.com/target/pull-request-code-coverage/internal/plugin/coverage"
13+
"git.target.com/target/pull-request-code-coverage/internal/plugin/domain"
1414
"github.com/pkg/errors"
1515
"github.com/sirupsen/logrus"
1616
)

internal/plugin/coverage/jacoco/report.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"log"
1010
"os"
1111

12-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/coverage"
13-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/domain"
12+
"git.target.com/target/pull-request-code-coverage/internal/plugin/coverage"
13+
"git.target.com/target/pull-request-code-coverage/internal/plugin/domain"
1414
"github.com/pkg/errors"
1515
)
1616

internal/plugin/coverage/report.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package coverage
22

3-
import "git.target.com/searchoss/pull-request-code-coverage/internal/plugin/domain"
3+
import "git.target.com/target/pull-request-code-coverage/internal/plugin/domain"
44

55
type Loader interface {
66
Load(coverageFile string) (Report, error)

internal/plugin/reporter/forking.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package reporter
22

33
import (
4-
"git.target.com/searchoss/pull-request-code-coverage/internal/plugin/domain"
4+
"git.target.com/target/pull-request-code-coverage/internal/plugin/domain"
55
"github.com/pkg/errors"
66
)
77

0 commit comments

Comments
 (0)