Skip to content

Commit

Permalink
fix: address a number of typos (#1307)
Browse files Browse the repository at this point in the history
I found these while working on other stuff
  • Loading branch information
G-Rath authored Oct 10, 2024
1 parent 43f9526 commit ca8c00a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion exit_code_redirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ last_arg="${!total_args}"
# Remove the last argument from the list
args=${@:1:$((total_args - 1))}

# () inteprets spaces as spearate entries in an array
# () interprets spaces as separate entries in an array
# tr replaces newlines with spaces
split_args=($(echo "$last_arg" | tr '\n' ' '))

Expand Down
2 changes: 1 addition & 1 deletion internal/customgitignore/dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ func hasPatternContaining(gips []gitignore.Pattern, test string) bool {
//
// ... because the changes in customgitignore adjust the
// implementation details of the upstream package so that
// it doesn't read .gitingore files from ignored dirs.
// it doesn't read .gitignore files from ignored dirs.
// This means that before _and_ after the change p.Match()
// will return false.
func patternContains(gip gitignore.Pattern, test string) bool {
Expand Down
4 changes: 2 additions & 2 deletions internal/customgitignore/walk_up_to_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
//
// It also returns the path to the root of the git-repo,
// or "" if this path isn't within a git repo, allowing
// a caller to know how .gitingore files were parsed.
// a caller to know how .gitignore files were parsed.
//
// The actual parsing is inteded to be similar to how tools
// The actual parsing is intended to be similar to how tools
// like rg work, but means that `path` may not necessarily be
// the root of a git repo, and can produces these parsing
// behaviours:
Expand Down
2 changes: 1 addition & 1 deletion internal/sourceanalysis/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func fillNotImportedAnalysisInfo(vulnsByID map[string]models.Vulnerability, vuln
}

func runGovulncheck(moddir string, vulns []models.Vulnerability, goVersion string) (map[string][]*govulncheck.Finding, error) {
// Create a temporary directory containing all of the vulnerabilities that
// Create a temporary directory containing all the vulnerabilities that
// are passed in to check against govulncheck.
//
// This enables OSV scanner to supply the OSV vulnerabilities to run
Expand Down
8 changes: 4 additions & 4 deletions pkg/lockfile/parse-conan-lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type ConanLockFile struct {
// TODO this is tentative and subject to change depending on the OSV schema
const ConanEcosystem Ecosystem = "ConanCenter"

func parseConanRenference(ref string) ConanReference {
func parseConanReference(ref string) ConanReference {
// very flexible format name/version[@username[/channel]][#rrev][:pkgid[#prev]][%timestamp]
var reference ConanReference

Expand Down Expand Up @@ -110,9 +110,9 @@ func parseConanV1Lock(lockfile ConanLockFile) []PackageDetails {

if node.Pref != "" {
// old format 0.3 (conan 1.27-) lockfiles use "pref" instead of "ref"
reference = parseConanRenference(node.Pref)
reference = parseConanReference(node.Pref)
} else if node.Ref != "" {
reference = parseConanRenference(node.Ref)
reference = parseConanReference(node.Ref)
} else {
continue
}
Expand All @@ -134,7 +134,7 @@ func parseConanV1Lock(lockfile ConanLockFile) []PackageDetails {

func parseConanRequires(packages *[]PackageDetails, requires []string, group string) {
for _, ref := range requires {
reference := parseConanRenference(ref)
reference := parseConanReference(ref)
// skip entries with no name, they are most likely consumer's conanfiles
// and not dependencies to be searched in a database anyway
if reference.Name == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/osv/osv.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
const (
// QueryEndpoint is the URL for posting queries to OSV.
QueryEndpoint = "https://api.osv.dev/v1/querybatch"
// GetEndpoint is the URL for getting vulenrabilities from OSV.
// GetEndpoint is the URL for getting vulnerabilities from OSV.
GetEndpoint = "https://api.osv.dev/v1/vulns"
// DetermineVersionEndpoint is the URL for posting determineversion queries to OSV.
DetermineVersionEndpoint = "https://api.osv.dev/v1experimental/determineversion"
Expand Down
2 changes: 1 addition & 1 deletion pkg/osvscanner/vulnerability_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/google/osv-scanner/pkg/reporter"
)

// buildVulnerablityResults takes the responses from the OSV API and the deps.dev API
// buildVulnerabilityResults takes the responses from the OSV API and the deps.dev API
// and converts this into a VulnerabilityResults. As part is this, it groups
// vulnerability information by source location.
// TODO: This function is getting long, we should refactor it
Expand Down

0 comments on commit ca8c00a

Please sign in to comment.