Skip to content

Commit 399e835

Browse files
alexandearccojocar
authored andcommitted
Fix typos in comments and fields
1 parent 229cf63 commit 399e835

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

analyzers/conversion_overflow.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type rangeResult struct {
4949
type branchResults struct {
5050
minValue *int
5151
maxValue *uint
52-
explixitPositiveVals []uint
52+
explicitPositiveVals []uint
5353
explicitNegativeVals []int
5454
convertFound bool
5555
}
@@ -336,9 +336,9 @@ func getResultRange(ifInstr *ssa.If, instr *ssa.Convert, visitedIfs map[*ssa.If]
336336
result.maxValue = min(result.maxValue, elseBounds.maxValue)
337337
}
338338

339-
result.explicitPositiveVals = append(result.explicitPositiveVals, thenBounds.explixitPositiveVals...)
339+
result.explicitPositiveVals = append(result.explicitPositiveVals, thenBounds.explicitPositiveVals...)
340340
result.explicitNegativeVals = append(result.explicitNegativeVals, thenBounds.explicitNegativeVals...)
341-
result.explicitPositiveVals = append(result.explicitPositiveVals, elseBounds.explixitPositiveVals...)
341+
result.explicitPositiveVals = append(result.explicitPositiveVals, elseBounds.explicitPositiveVals...)
342342
result.explicitNegativeVals = append(result.explicitNegativeVals, elseBounds.explicitNegativeVals...)
343343

344344
return result
@@ -451,7 +451,7 @@ func walkBranchForConvert(block *ssa.BasicBlock, instr *ssa.Convert, visitedIfs
451451
if result.isRangeCheck {
452452
bounds.minValue = toPtr(max(result.minValue, bounds.minValue))
453453
bounds.maxValue = toPtr(min(result.maxValue, bounds.maxValue))
454-
bounds.explixitPositiveVals = append(bounds.explixitPositiveVals, result.explicitPositiveVals...)
454+
bounds.explicitPositiveVals = append(bounds.explicitPositiveVals, result.explicitPositiveVals...)
455455
bounds.explicitNegativeVals = append(bounds.explicitNegativeVals, result.explicitNegativeVals...)
456456
}
457457
case *ssa.Call:

analyzers/hardcoded_nonce.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ func iterateThroughReferrers(variable ssa.Value, funcsToTrack map[string][]int,
160160
if refs == nil {
161161
return gosecIssues, nil
162162
}
163-
// Go trough all functions that use the given arg variable
163+
// Go through all functions that use the given arg variable
164164
for _, ref := range *refs {
165-
// Iterate trough the functions we are interested
165+
// Iterate through the functions we are interested
166166
for trackedFunc := range funcsToTrack {
167167

168168
// Split the functions we are interested in, by the '.' because we will use the function name to do the comparison

rules/fileperms.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (r *osCreatePermissions) Match(n ast.Node, c *gosec.Context) (*issue.Issue,
157157
return nil, nil
158158
}
159159

160-
// NewOsCreatePerms reates a rule to detect file creation with a more permissive than configured
160+
// NewOsCreatePerms creates a rule to detect file creation with a more permissive than configured
161161
// permission mask.
162162
func NewOsCreatePerms(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
163163
mode := getConfiguredMode(conf, id, 0o666)

0 commit comments

Comments
 (0)