Skip to content

Commit

Permalink
🌱 v3 upgrade changes (#1118)
Browse files Browse the repository at this point in the history
v3 go.mod changes
  • Loading branch information
naveensrinivasan authored Oct 7, 2021
1 parent f153db5 commit 6c1c789
Show file tree
Hide file tree
Showing 103 changed files with 241 additions and 241 deletions.
2 changes: 1 addition & 1 deletion checker/check_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package checker
import (
"context"

"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v3/clients"
)

// CheckRequest struct encapsulates all data to be passed into a CheckFn.
Expand Down
4 changes: 2 additions & 2 deletions checker/check_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
opencensusstats "go.opencensus.io/stats"
"go.opencensus.io/tag"

sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v2/stats"
sce "github.com/ossf/scorecard/v3/errors"
"github.com/ossf/scorecard/v3/stats"
)

const checkRetries = 3
Expand Down
2 changes: 1 addition & 1 deletion checks/all_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// Package checks defines all Scorecard checks.
package checks

import "github.com/ossf/scorecard/v2/checker"
import "github.com/ossf/scorecard/v3/checker"

// AllChecks is the list of all security checks that will be run.
var AllChecks = checker.CheckNameToFnMap{}
Expand Down
4 changes: 2 additions & 2 deletions checks/binary_artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/h2non/filetype"
"github.com/h2non/filetype/types"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckBinaryArtifacts is the exported name for Binary-Artifacts check.
Expand Down
6 changes: 3 additions & 3 deletions checks/branch_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"
"regexp"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions checks/branch_protection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

"github.com/golang/mock/gomock"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v2/clients/mockrepo"
sce "github.com/ossf/scorecard/v2/errors"
scut "github.com/ossf/scorecard/v2/utests"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
"github.com/ossf/scorecard/v3/clients/mockrepo"
sce "github.com/ossf/scorecard/v3/errors"
scut "github.com/ossf/scorecard/v3/utests"
)

func getBranch(branches []*clients.BranchRef, name string) *clients.BranchRef {
Expand Down
6 changes: 3 additions & 3 deletions checks/ci_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"fmt"
"strings"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

// States for which CI system is in use.
Expand Down
4 changes: 2 additions & 2 deletions checks/cii_best_practices.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"net/http"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckCIIBestPractices is the registered name for CIIBestPractices.
Expand Down
4 changes: 2 additions & 2 deletions checks/code_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckCodeReview is the registered name for DoesCodeReview.
Expand Down
4 changes: 2 additions & 2 deletions checks/contributors.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion checks/dependency_update_tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package checks
import (
"strings"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v3/checker"
)

// CheckDependencyUpdateTool is the exported name for Automatic-Depdendency-Update.
Expand Down
6 changes: 3 additions & 3 deletions checks/file_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"path"
"strings"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

// isMatchingPath uses 'pattern' to shell-match the 'path' and its filename
Expand Down
8 changes: 4 additions & 4 deletions checks/fuzzing.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (

"go.uber.org/zap"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v2/clients/githubrepo"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
"github.com/ossf/scorecard/v3/clients/githubrepo"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckFuzzing is the registered name for Fuzzing.
Expand Down
4 changes: 2 additions & 2 deletions checks/maintained.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"time"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions checks/packaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"regexp"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckPackaging is the registered name for Packaging.
Expand Down
4 changes: 2 additions & 2 deletions checks/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"gopkg.in/yaml.v2"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckTokenPermissions is the exported name for Token-Permissions check.
Expand Down
4 changes: 2 additions & 2 deletions checks/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"io/ioutil"
"testing"

"github.com/ossf/scorecard/v2/checker"
scut "github.com/ossf/scorecard/v2/utests"
"github.com/ossf/scorecard/v3/checker"
scut "github.com/ossf/scorecard/v3/utests"
)

//nolint
Expand Down
4 changes: 2 additions & 2 deletions checks/pinned_dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/moby/buildkit/frontend/dockerfile/parser"
"gopkg.in/yaml.v3"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckPinnedDependencies is the registered name for FrozenDeps.
Expand Down
4 changes: 2 additions & 2 deletions checks/pinned_dependencies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/google/go-cmp/cmp"
"gopkg.in/yaml.v3"

"github.com/ossf/scorecard/v2/checker"
scut "github.com/ossf/scorecard/v2/utests"
"github.com/ossf/scorecard/v3/checker"
scut "github.com/ossf/scorecard/v3/utests"
)

func TestGithubWorkflowPinning(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions checks/sast.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package checks
import (
"fmt"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckSAST is the registered name for SAST.
Expand Down
6 changes: 3 additions & 3 deletions checks/security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (

"go.uber.org/zap"

"github.com/ossf/scorecard/v2/checker"
"github.com/ossf/scorecard/v2/clients/githubrepo"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
"github.com/ossf/scorecard/v3/clients/githubrepo"
sce "github.com/ossf/scorecard/v3/errors"
)

// CheckSecurityPolicy is the registred name for SecurityPolicy.
Expand Down
4 changes: 2 additions & 2 deletions checks/shell_download_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

"mvdan.cc/sh/v3/syntax"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions checks/signed_releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions checks/vulnerabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"net/http"
"strings"

"github.com/ossf/scorecard/v2/checker"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/checker"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/google/go-github/v38/github"
"github.com/shurcooL/githubv4"

"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/checkruns.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

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

"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

type checkrunsHandler struct {
Expand Down
6 changes: 3 additions & 3 deletions clients/githubrepo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v2/clients/githubrepo/roundtripper"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
"github.com/ossf/scorecard/v3/clients/githubrepo/roundtripper"
sce "github.com/ossf/scorecard/v3/errors"
)

var errInputRepoType = errors.New("input repo should be of type repoURL")
Expand Down
2 changes: 1 addition & 1 deletion clients/githubrepo/contributors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

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

"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v3/clients"
)

type contributorsHandler struct {
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/shurcooL/githubv4"

"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

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

"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

type releasesHandler struct {
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/repo_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"net/url"
"strings"

"github.com/ossf/scorecard/v2/clients"
sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v3/clients"
sce "github.com/ossf/scorecard/v3/errors"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/githubrepo/roundtripper/census.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
opencensusstats "go.opencensus.io/stats"
"go.opencensus.io/tag"

sce "github.com/ossf/scorecard/v2/errors"
"github.com/ossf/scorecard/v2/stats"
sce "github.com/ossf/scorecard/v3/errors"
"github.com/ossf/scorecard/v3/stats"
)

const fromCacheHeader = "X-From-Cache"
Expand Down
2 changes: 1 addition & 1 deletion clients/githubrepo/roundtripper/rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"go.uber.org/zap"

sce "github.com/ossf/scorecard/v2/errors"
sce "github.com/ossf/scorecard/v3/errors"
)

// MakeRateLimitedTransport returns a RoundTripper which rate limits GitHub requests.
Expand Down
2 changes: 1 addition & 1 deletion clients/githubrepo/roundtripper/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/tag"

githubstats "github.com/ossf/scorecard/v2/clients/githubrepo/stats"
githubstats "github.com/ossf/scorecard/v3/clients/githubrepo/stats"
)

const expiryTimeInSec = 30
Expand Down
2 changes: 1 addition & 1 deletion clients/githubrepo/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

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

"github.com/ossf/scorecard/v2/clients"
"github.com/ossf/scorecard/v3/clients"
)

var errEmptyQuery = errors.New("search query is empty")
Expand Down
Loading

0 comments on commit 6c1c789

Please sign in to comment.