Skip to content

Commit ca8c00a

Browse files
authored
fix: address a number of typos (google#1307)
I found these while working on other stuff
1 parent 43f9526 commit ca8c00a

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

exit_code_redirect.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ last_arg="${!total_args}"
2828
# Remove the last argument from the list
2929
args=${@:1:$((total_args - 1))}
3030

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

internal/customgitignore/dir_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ func hasPatternContaining(gips []gitignore.Pattern, test string) bool {
721721
//
722722
// ... because the changes in customgitignore adjust the
723723
// implementation details of the upstream package so that
724-
// it doesn't read .gitingore files from ignored dirs.
724+
// it doesn't read .gitignore files from ignored dirs.
725725
// This means that before _and_ after the change p.Match()
726726
// will return false.
727727
func patternContains(gip gitignore.Pattern, test string) bool {

internal/customgitignore/walk_up_to_root.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
//
2929
// It also returns the path to the root of the git-repo,
3030
// or "" if this path isn't within a git repo, allowing
31-
// a caller to know how .gitingore files were parsed.
31+
// a caller to know how .gitignore files were parsed.
3232
//
33-
// The actual parsing is inteded to be similar to how tools
33+
// The actual parsing is intended to be similar to how tools
3434
// like rg work, but means that `path` may not necessarily be
3535
// the root of a git repo, and can produces these parsing
3636
// behaviours:

internal/sourceanalysis/go.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func fillNotImportedAnalysisInfo(vulnsByID map[string]models.Vulnerability, vuln
127127
}
128128

129129
func runGovulncheck(moddir string, vulns []models.Vulnerability, goVersion string) (map[string][]*govulncheck.Finding, error) {
130-
// Create a temporary directory containing all of the vulnerabilities that
130+
// Create a temporary directory containing all the vulnerabilities that
131131
// are passed in to check against govulncheck.
132132
//
133133
// This enables OSV scanner to supply the OSV vulnerabilities to run

pkg/lockfile/parse-conan-lock.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type ConanLockFile struct {
4747
// TODO this is tentative and subject to change depending on the OSV schema
4848
const ConanEcosystem Ecosystem = "ConanCenter"
4949

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

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

111111
if node.Pref != "" {
112112
// old format 0.3 (conan 1.27-) lockfiles use "pref" instead of "ref"
113-
reference = parseConanRenference(node.Pref)
113+
reference = parseConanReference(node.Pref)
114114
} else if node.Ref != "" {
115-
reference = parseConanRenference(node.Ref)
115+
reference = parseConanReference(node.Ref)
116116
} else {
117117
continue
118118
}
@@ -134,7 +134,7 @@ func parseConanV1Lock(lockfile ConanLockFile) []PackageDetails {
134134

135135
func parseConanRequires(packages *[]PackageDetails, requires []string, group string) {
136136
for _, ref := range requires {
137-
reference := parseConanRenference(ref)
137+
reference := parseConanReference(ref)
138138
// skip entries with no name, they are most likely consumer's conanfiles
139139
// and not dependencies to be searched in a database anyway
140140
if reference.Name == "" {

pkg/osv/osv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
const (
2020
// QueryEndpoint is the URL for posting queries to OSV.
2121
QueryEndpoint = "https://api.osv.dev/v1/querybatch"
22-
// GetEndpoint is the URL for getting vulenrabilities from OSV.
22+
// GetEndpoint is the URL for getting vulnerabilities from OSV.
2323
GetEndpoint = "https://api.osv.dev/v1/vulns"
2424
// DetermineVersionEndpoint is the URL for posting determineversion queries to OSV.
2525
DetermineVersionEndpoint = "https://api.osv.dev/v1experimental/determineversion"

pkg/osvscanner/vulnerability_result.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/google/osv-scanner/pkg/reporter"
1515
)
1616

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

0 commit comments

Comments
 (0)