Skip to content

Commit

Permalink
Fix the "v2" behavior to match Go's git + mod functionality. (#563)
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Brown <[email protected]>
calebbrown authored Mar 17, 2024

Verified

This commit was signed with the committer’s verified signature.
typekpb Peter Butkovic
1 parent 947e68d commit 7af16f1
Showing 60 changed files with 171 additions and 103 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ open source project:
## Usage

```shell
$ go install github.com/ossf/criticality_score/cmd/criticality_score@latest
$ go install github.com/ossf/criticality_score/v2/cmd/criticality_score@latest

$ export GITHUB_TOKEN=... # requires a GitHub token to work
$ gcloud auth login --update-adc # optional, add -depsdev-disable to skip
2 changes: 1 addition & 1 deletion cmd/collect_signals/localworker/loop.go
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ import (
"github.com/ossf/scorecard/v4/cron/worker"
"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

// maxAttempts is the maximum number of times a batch will be attempted before
2 changes: 1 addition & 1 deletion cmd/collect_signals/localworker/loop_test.go
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import (
"gocloud.dev/blob"
_ "gocloud.dev/blob/fileblob"

"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

type testWorker struct {
2 changes: 1 addition & 1 deletion cmd/collect_signals/localworker/scorecardcompat.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/ossf/criticality_score/cmd/collect_signals/vcs"
"github.com/ossf/criticality_score/v2/cmd/collect_signals/vcs"
)

var headSHA = clients.HeadSHA
8 changes: 4 additions & 4 deletions cmd/collect_signals/main.go
Original file line number Diff line number Diff line change
@@ -30,10 +30,10 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/criticality_score/cmd/collect_signals/localworker"
"github.com/ossf/criticality_score/cmd/collect_signals/vcs"
"github.com/ossf/criticality_score/internal/collector"
log "github.com/ossf/criticality_score/internal/log"
"github.com/ossf/criticality_score/v2/cmd/collect_signals/localworker"
"github.com/ossf/criticality_score/v2/cmd/collect_signals/vcs"
"github.com/ossf/criticality_score/v2/internal/collector"
log "github.com/ossf/criticality_score/v2/internal/log"
)

const (
8 changes: 4 additions & 4 deletions cmd/collect_signals/worker.go
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ import (
"go.opencensus.io/stats/view"
"go.uber.org/zap"

"github.com/ossf/criticality_score/cmd/collect_signals/vcs"
"github.com/ossf/criticality_score/internal/collector"
"github.com/ossf/criticality_score/internal/scorer"
"github.com/ossf/criticality_score/internal/signalio"
"github.com/ossf/criticality_score/v2/cmd/collect_signals/vcs"
"github.com/ossf/criticality_score/v2/internal/collector"
"github.com/ossf/criticality_score/v2/internal/scorer"
"github.com/ossf/criticality_score/v2/internal/signalio"
)

const (
2 changes: 1 addition & 1 deletion cmd/criticality_score/README.md
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ $ criticality_score \
## Install

```shell
$ go install github.com/ossf/criticality_score/cmd/criticality_score
$ go install github.com/ossf/criticality_score/v2/cmd/criticality_score
```

## Usage
4 changes: 2 additions & 2 deletions cmd/criticality_score/inputiter/new.go
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ import (
"net/url"
"os"

"github.com/ossf/criticality_score/internal/infile"
"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/infile"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

// osErrorWithFilename is an os-specific helper for determining if a particular
2 changes: 1 addition & 1 deletion cmd/criticality_score/inputiter/new_test.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import (
"slices"
"testing"

"github.com/ossf/criticality_score/cmd/criticality_score/inputiter"
"github.com/ossf/criticality_score/v2/cmd/criticality_score/inputiter"
)

func TestNew_SingleURL(t *testing.T) {
14 changes: 7 additions & 7 deletions cmd/criticality_score/main.go
Original file line number Diff line number Diff line change
@@ -29,13 +29,13 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/criticality_score/cmd/criticality_score/inputiter"
"github.com/ossf/criticality_score/internal/collector"
log "github.com/ossf/criticality_score/internal/log"
"github.com/ossf/criticality_score/internal/outfile"
"github.com/ossf/criticality_score/internal/scorer"
"github.com/ossf/criticality_score/internal/signalio"
"github.com/ossf/criticality_score/internal/workerpool"
"github.com/ossf/criticality_score/v2/cmd/criticality_score/inputiter"
"github.com/ossf/criticality_score/v2/internal/collector"
log "github.com/ossf/criticality_score/v2/internal/log"
"github.com/ossf/criticality_score/v2/internal/outfile"
"github.com/ossf/criticality_score/v2/internal/scorer"
"github.com/ossf/criticality_score/v2/internal/signalio"
"github.com/ossf/criticality_score/v2/internal/workerpool"
)

const defaultLogLevel = zapcore.InfoLevel
2 changes: 1 addition & 1 deletion cmd/csv_transfer/main.go
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/criticality_score/internal/log"
"github.com/ossf/criticality_score/v2/internal/log"
)

const defaultLogLevel = zapcore.InfoLevel
4 changes: 2 additions & 2 deletions cmd/enumerate_github/README.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ $ enumerate_github \
## Install

```shell
$ go install github.com/ossf/criticality_score/cmd/enumerate_github
$ go install github.com/ossf/criticality_score/v2/cmd/enumerate_github
```

## Usage
@@ -136,4 +136,4 @@ $ go run ./cmd/enumerate_github \
-start=2022-06-14 \
-end=2022-06-21 \
-min-stars=20
```
```
2 changes: 1 addition & 1 deletion cmd/enumerate_github/githubsearch/repos.go
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import (
"github.com/hasura/go-graphql-client"
"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/githubapi/pagination"
"github.com/ossf/criticality_score/v2/internal/githubapi/pagination"
)

// repo is part of the GitHub GraphQL query and includes the fields
16 changes: 8 additions & 8 deletions cmd/enumerate_github/main.go
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/criticality_score/cmd/enumerate_github/githubsearch"
"github.com/ossf/criticality_score/cmd/enumerate_github/marker"
"github.com/ossf/criticality_score/cmd/enumerate_github/repowriter"
"github.com/ossf/criticality_score/internal/envflag"
"github.com/ossf/criticality_score/internal/githubapi"
log "github.com/ossf/criticality_score/internal/log"
"github.com/ossf/criticality_score/internal/outfile"
"github.com/ossf/criticality_score/internal/workerpool"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/githubsearch"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/marker"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/repowriter"
"github.com/ossf/criticality_score/v2/internal/envflag"
"github.com/ossf/criticality_score/v2/internal/githubapi"
log "github.com/ossf/criticality_score/v2/internal/log"
"github.com/ossf/criticality_score/v2/internal/outfile"
"github.com/ossf/criticality_score/v2/internal/workerpool"
)

const (
2 changes: 1 addition & 1 deletion cmd/enumerate_github/marker/type_test.go
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ import (
"strings"
"testing"

"github.com/ossf/criticality_score/cmd/enumerate_github/marker"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/marker"
)

func TestTransform(t *testing.T) {
2 changes: 1 addition & 1 deletion cmd/enumerate_github/marker/write.go
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import (
"context"
"fmt"

"github.com/ossf/criticality_score/internal/cloudstorage"
"github.com/ossf/criticality_score/v2/internal/cloudstorage"
)

func Write(ctx context.Context, t Type, markerFile, outFile string) (err error) {
2 changes: 1 addition & 1 deletion cmd/enumerate_github/marker/write_test.go
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ import (
"strings"
"testing"

"github.com/ossf/criticality_score/cmd/enumerate_github/marker"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/marker"
)

func TestWrite(t *testing.T) {
2 changes: 1 addition & 1 deletion cmd/enumerate_github/repowriter/scorecard_test.go
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/ossf/criticality_score/cmd/enumerate_github/repowriter"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/repowriter"
)

func TestScorecardRepoWriter(t *testing.T) {
2 changes: 1 addition & 1 deletion cmd/enumerate_github/repowriter/text_test.go
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/ossf/criticality_score/cmd/enumerate_github/repowriter"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/repowriter"
)

func TestTextRepoWriter(t *testing.T) {
2 changes: 1 addition & 1 deletion cmd/enumerate_github/repowriter/type_test.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/ossf/criticality_score/cmd/enumerate_github/repowriter"
"github.com/ossf/criticality_score/v2/cmd/enumerate_github/repowriter"
)

func TestTypeString(t *testing.T) {
4 changes: 2 additions & 2 deletions cmd/scorer/README.md
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ $ scorer \
## Install

```shell
$ go install github.com/ossf/criticality_score/cmd/scorer
$ go install github.com/ossf/criticality_score/v2/cmd/scorer
```

## Usage
@@ -168,4 +168,4 @@ https://github.com/georgetomzaridis/aade-publicity-search-js,JavaScript,MIT Lice
https://github.com/mobcode1337/Twitter-Account-Creator,Python,,19,2022-11-22T12:58:49Z,2022-11-23T00:10:02Z,0,0,1,0,0.04,0,0,0,0,0,,0.11128,2022-11-28T02:47:06Z
```

An example for the raw signal data can be found at: https://commondatastorage.googleapis.com/ossf-criticality-score/index.html?prefix=2022.11.28/024706/
An example for the raw signal data can be found at: https://commondatastorage.googleapis.com/ossf-criticality-score/index.html?prefix=2022.11.28/024706/
8 changes: 4 additions & 4 deletions cmd/scorer/main.go
Original file line number Diff line number Diff line change
@@ -45,10 +45,10 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/criticality_score/internal/infile"
log "github.com/ossf/criticality_score/internal/log"
"github.com/ossf/criticality_score/internal/outfile"
"github.com/ossf/criticality_score/internal/scorer"
"github.com/ossf/criticality_score/v2/internal/infile"
log "github.com/ossf/criticality_score/v2/internal/log"
"github.com/ossf/criticality_score/v2/internal/outfile"
"github.com/ossf/criticality_score/v2/internal/scorer"
)

const defaultLogLevel = zapcore.InfoLevel
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ossf/criticality_score
module github.com/ossf/criticality_score/v2

go 1.21

68 changes: 68 additions & 0 deletions go.work.sum

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions internal/collector/collector.go
Original file line number Diff line number Diff line change
@@ -24,12 +24,12 @@ import (

"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/collector/depsdev"
"github.com/ossf/criticality_score/internal/collector/github"
"github.com/ossf/criticality_score/internal/collector/githubmentions"
"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/collector/depsdev"
"github.com/ossf/criticality_score/v2/internal/collector/github"
"github.com/ossf/criticality_score/v2/internal/collector/githubmentions"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

// ErrUncollectableRepo is the error returned when there is a problem with
2 changes: 1 addition & 1 deletion internal/collector/config.go
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ import (
sclog "github.com/ossf/scorecard/v4/log"
"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

// DefaultGCPDatasetName is the default name to use for GCP BigQuery Datasets.
4 changes: 2 additions & 2 deletions internal/collector/depsdev/source.go
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ import (
"cloud.google.com/go/bigquery"
"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

const (
4 changes: 2 additions & 2 deletions internal/collector/github/factory.go
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ import (

"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

type factory struct {
2 changes: 1 addition & 1 deletion internal/collector/github/legacy/contributors.go
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import (

"github.com/google/go-github/v47/github"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

// FetchTotalContributors returns the total number of contributors for the given repository.
2 changes: 1 addition & 1 deletion internal/collector/github/legacy/created.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import (

"github.com/google/go-github/v47/github"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

// FetchCreatedTime returns the earliest known creation time for a given
2 changes: 1 addition & 1 deletion internal/collector/github/legacy/issues.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import (

"github.com/google/go-github/v47/github"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

type IssueState string
4 changes: 2 additions & 2 deletions internal/collector/github/legacy/releases.go
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ import (

"github.com/hasura/go-graphql-client"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/internal/githubapi/pagination"
"github.com/ossf/criticality_score/v2/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi/pagination"
)

type repoReleasesQuery struct {
2 changes: 1 addition & 1 deletion internal/collector/github/queries.go
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import (

"github.com/hasura/go-graphql-client"

"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

const (
4 changes: 2 additions & 2 deletions internal/collector/github/repo.go
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@ import (

"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/collector/github/legacy"
"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/collector/github/legacy"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

// repo implements the projectrepo.Repo interface for a GitHub repository.
6 changes: 3 additions & 3 deletions internal/collector/github/source.go
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@ import (
"errors"
"time"

"github.com/ossf/criticality_score/internal/collector/github/legacy"
"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/github/legacy"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type RepoSource struct{}
6 changes: 3 additions & 3 deletions internal/collector/githubmentions/source.go
Original file line number Diff line number Diff line change
@@ -28,9 +28,9 @@ import (

"github.com/google/go-github/v47/github"

"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/internal/githubapi"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/githubapi"
)

type mentionSet struct {
4 changes: 2 additions & 2 deletions internal/collector/registry.go
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ import (
"context"
"fmt"

"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

// empty is a convenience wrapper for the empty struct.
2 changes: 1 addition & 1 deletion internal/collector/signal/source.go
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ package signal
import (
"context"

"github.com/ossf/criticality_score/internal/collector/projectrepo"
"github.com/ossf/criticality_score/v2/internal/collector/projectrepo"
)

// A Source is used to get a set of signals for a given project repository.
2 changes: 1 addition & 1 deletion internal/envflag/envflag_test.go
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import (
"flag"
"testing"

"github.com/ossf/criticality_score/internal/envflag"
"github.com/ossf/criticality_score/v2/internal/envflag"
)

func TestEnvVarSet(t *testing.T) {
2 changes: 1 addition & 1 deletion internal/githubapi/roundtripper.go
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import (
"github.com/google/go-github/v47/github"
"go.uber.org/zap"

"github.com/ossf/criticality_score/internal/retry"
"github.com/ossf/criticality_score/v2/internal/retry"
)

const (
2 changes: 1 addition & 1 deletion internal/githubapi/roundtripper_test.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ import (

"go.uber.org/zap/zaptest"

"github.com/ossf/criticality_score/internal/retry"
"github.com/ossf/criticality_score/v2/internal/retry"
)

const (
2 changes: 1 addition & 1 deletion internal/iterator/batch_test.go
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import (
"testing"
"testing/iotest"

"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

func TestBatchIter_Empty(t *testing.T) {
2 changes: 1 addition & 1 deletion internal/iterator/scanner_test.go
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import (
"testing"
"testing/iotest"

"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

func TestScannerIter_Empty(t *testing.T) {
2 changes: 1 addition & 1 deletion internal/iterator/slice_test.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import (
"slices"
"testing"

"github.com/ossf/criticality_score/internal/iterator"
"github.com/ossf/criticality_score/v2/internal/iterator"
)

func TestSliceIter_Empty(t *testing.T) {
2 changes: 1 addition & 1 deletion internal/scorer/algorithm/wam/wam.go
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
package wam

import (
"github.com/ossf/criticality_score/internal/scorer/algorithm"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
)

const Name = "weighted_arithmetic_mean"
2 changes: 1 addition & 1 deletion internal/scorer/algorithm/wam/wam_test.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import (
"math"
"testing"

"github.com/ossf/criticality_score/internal/scorer/algorithm"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
)

func TestWeighetedArithmeticMean_Score(t *testing.T) {
4 changes: 2 additions & 2 deletions internal/scorer/config.go
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@ import (

"gopkg.in/yaml.v3"

"github.com/ossf/criticality_score/internal/scorer/algorithm"
"github.com/ossf/criticality_score/internal/scorer/algorithm/wam"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm/wam"
)

type Condition struct {
2 changes: 1 addition & 1 deletion internal/scorer/config_test.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/ossf/criticality_score/internal/scorer/algorithm"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
)

func TestInput_ToAlgorithmInput(t *testing.T) {
6 changes: 3 additions & 3 deletions internal/scorer/scorer.go
Original file line number Diff line number Diff line change
@@ -22,9 +22,9 @@ import (
"strings"
"unicode"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/internal/scorer/algorithm"
_ "github.com/ossf/criticality_score/internal/scorer/algorithm/wam"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
_ "github.com/ossf/criticality_score/v2/internal/scorer/algorithm/wam"
)

var ErrEmptyName = fmt.Errorf("name must be non-empty")
4 changes: 2 additions & 2 deletions internal/scorer/scorer_test.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ package scorer
import (
"testing"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/internal/scorer/algorithm"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/scorer/algorithm"
)

type testAlgo struct {
2 changes: 1 addition & 1 deletion internal/signalio/csv.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import (
"io"
"sync"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type csvWriter struct {
2 changes: 1 addition & 1 deletion internal/signalio/helpers.go
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ import (
"fmt"
"time"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

func fieldsFromSignalSets(sets []signal.Set, extra []string) []string {
2 changes: 1 addition & 1 deletion internal/signalio/helpers_test.go
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ import (
"reflect"
"testing"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type testSet struct { //nolint:govet
2 changes: 1 addition & 1 deletion internal/signalio/json.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import (
"io"
"sync"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type jsonWriter struct {
2 changes: 1 addition & 1 deletion internal/signalio/text.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import (
"io"
"sync"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type textWriter struct {
2 changes: 1 addition & 1 deletion internal/signalio/type.go
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import (
"errors"
"io"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

type WriterType int
4 changes: 2 additions & 2 deletions internal/signalio/type_test.go
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@ import (
"reflect"
"testing"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/internal/signalio"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/signalio"
)

func TestTypeString(t *testing.T) {
2 changes: 1 addition & 1 deletion internal/signalio/writer.go
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ package signalio
import (
"errors"

"github.com/ossf/criticality_score/internal/collector/signal"
"github.com/ossf/criticality_score/v2/internal/collector/signal"
)

var ErrorMarshalFailure = errors.New("failed to marshal value")
2 changes: 1 addition & 1 deletion internal/workerpool/workerpool_test.go
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import (
"sync/atomic"
"testing"

"github.com/ossf/criticality_score/internal/workerpool"
"github.com/ossf/criticality_score/v2/internal/workerpool"
)

func TestOneWorker(t *testing.T) {
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ossf/criticality_score/tools
module github.com/ossf/criticality_score/tools/v2

go 1.21

0 comments on commit 7af16f1

Please sign in to comment.