Skip to content

Commit 1f68996

Browse files
alexandearccojocar
authored andcommitted
Fix typos in comments, vars and tests
1 parent e148465 commit 1f68996

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var generatedCodePattern = regexp.MustCompile(`^// Code generated .* DO NOT EDIT
5959

6060
// The Context is populated with data parsed from the source code as it is scanned.
6161
// It is passed through to all rule functions as they are called. Rules may use
62-
// this data in conjunction withe the encountered AST node.
62+
// this data in conjunction with the encountered AST node.
6363
type Context struct {
6464
FileSet *token.FileSet
6565
Comments ast.CommentMap

analyzers/ssrf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func runSSRF(pass *analysis.Pass) (interface{}, error) {
4646
if callee != nil {
4747
ssaResult.Logger.Printf("callee: %s\n", callee)
4848
return newIssue(pass.Analyzer.Name,
49-
"not implemeted",
49+
"not implemented",
5050
pass.Fset, instr.Call.Pos(), issue.Low, issue.High), nil
5151
}
5252
}

analyzers/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
// SSAAnalyzerResult contains various information returned by the
31-
// SSA analysis along with some configuraion
31+
// SSA analysis along with some configuration
3232
type SSAAnalyzerResult struct {
3333
Config map[string]interface{}
3434
Logger *log.Logger
@@ -42,7 +42,7 @@ func BuildDefaultAnalyzers() []*analysis.Analyzer {
4242
}
4343
}
4444

45-
// getSSAResult retrives the SSA result from analysis pass
45+
// getSSAResult retrieves the SSA result from analysis pass
4646
func getSSAResult(pass *analysis.Pass) (*SSAAnalyzerResult, error) {
4747
result, ok := pass.ResultOf[buildssa.Analyzer]
4848
if !ok {

cmd/gosec/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ var (
143143
// output suppression information for auditing purposes
144144
flagTrackSuppressions = flag.Bool("track-suppressions", false, "Output suppression information, including its kind and justification")
145145

146-
// exlude the folders from scan
146+
// exclude the folders from scan
147147
flagDirsExclude arrayFlags
148148

149149
logger *log.Logger

helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func Getenv(key, userDefault string) string {
301301
return userDefault
302302
}
303303

304-
// GetPkgRelativePath returns the Go relative relative path derived
304+
// GetPkgRelativePath returns the Go relative path derived
305305
// form the given path
306306
func GetPkgRelativePath(path string) (string, error) {
307307
abspath, err := filepath.Abs(path)

helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var _ = Describe("Helpers", func() {
3232
Expect(err).ShouldNot(HaveOccurred())
3333
Expect(paths).Should(Equal([]string{dir}))
3434
})
35-
It("should return the package package path", func() {
35+
It("should return the package path", func() {
3636
paths, err := gosec.PackagePaths(dir+"/...", nil)
3737
Expect(err).ShouldNot(HaveOccurred())
3838
Expect(paths).Should(Equal([]string{dir}))

report/formatter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ var _ = Describe("Formatter", func() {
188188
Expect(*issues).To(Equal(*want))
189189
})
190190

191-
It("it should parse the report info for multiple projects projects", func() {
191+
It("it should parse the report info for multiple projects", func() {
192192
data := &gosec.ReportInfo{
193193
Errors: map[string][]gosec.Error{},
194194
Issues: []*issue.Issue{

report/sarif/sarif_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ var _ = Describe("Sarif Formatter", func() {
162162
sarifReport, err := sarif.GenerateReport([]string{}, reportInfo)
163163

164164
Expect(err).ShouldNot(HaveOccurred())
165-
resultRuleIdexes := map[string]int{}
165+
resultRuleIndexes := map[string]int{}
166166
for _, result := range sarifReport.Runs[0].Results {
167-
resultRuleIdexes[result.RuleID] = result.RuleIndex
167+
resultRuleIndexes[result.RuleID] = result.RuleIndex
168168
}
169169
driverRuleIndexes := map[string]int{}
170170
for ruleIndex, rule := range sarifReport.Runs[0].Tool.Driver.Rules {
171171
driverRuleIndexes[rule.ID] = ruleIndex
172172
}
173-
Expect(resultRuleIdexes).Should(Equal(driverRuleIndexes))
173+
Expect(resultRuleIndexes).Should(Equal(driverRuleIndexes))
174174
})
175175
})
176176
})

report/sonar/sonar_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ var _ = Describe("Sonar Formatter", func() {
140140
Expect(*issues).To(Equal(*want))
141141
})
142142

143-
It("it should parse the report info for multiple projects projects", func() {
143+
It("it should parse the report info for multiple projects", func() {
144144
data := &gosec.ReportInfo{
145145
Errors: map[string][]gosec.Error{},
146146
Issues: []*issue.Issue{

rule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewRuleSet() RuleSet {
4343
return RuleSet{make(map[reflect.Type][]Rule), make(map[string]bool)}
4444
}
4545

46-
// Register adds a trigger for the supplied rule for the the
46+
// Register adds a trigger for the supplied rule for the
4747
// specified ast nodes.
4848
func (r RuleSet) Register(rule Rule, isSuppressed bool, nodes ...ast.Node) {
4949
for _, n := range nodes {

0 commit comments

Comments
 (0)