Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsimon committed Aug 31, 2021
1 parent 913f75e commit d4db686
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scorecard_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ import (
sce "github.com/ossf/scorecard/v2/errors"
)

// ScorecardInfo contains information about the scorecard code tat was run.
type ScorecardInfo struct {
Version string
CommitSHA string
}

// RepoInfo contains information about the repo that was analyzed.
type RepoInfo struct {
Name string
CommitSHA string
Expand Down
8 changes: 8 additions & 0 deletions pkg/scorecard_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,42 @@ var (
buildDate = "unknown"
)

// GetVersion returns the scorecard version.
func GetVersion() string {
return gitVersion
}

// GetCommit returns the GitHub's commit hash that scorecard was built from.
func GetCommit() string {
return gitCommit
}

// GetTreeState returns the git tree state.
func GetTreeState() string {
return gitTreeState
}

// GetBuildDate returns the date scorecard was build.
func GetBuildDate() string {
return buildDate
}

// GetGoVersion returns the Go version used to build scorecard.
func GetGoVersion() string {
return runtime.Version()
}

// GetOS returns the OS the build can run on.
func GetOS() string {
return runtime.GOOS
}

// GetArch returns the architecture (e.g., x86) the build can run on.
func GetArch() string {
return runtime.GOARCH
}

// GetCompiler returns the compiler that was used to build scorecard.
func GetCompiler() string {
return runtime.Compiler
}

0 comments on commit d4db686

Please sign in to comment.