Skip to content

Commit 4df7f1c

Browse files
authored
Fix typos, Go Report link and Gofmt
1 parent f4ea33d commit 4df7f1c

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You may obtain a copy of the License [here](http://www.apache.org/licenses/LICEN
1616
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3218/badge)](https://bestpractices.coreinfrastructure.org/projects/3218)
1717
[![Build Status](https://github.com/securego/gosec/workflows/CI/badge.svg)](https://github.com/securego/gosec/actions?query=workflows%3ACI)
1818
[![Coverage Status](https://codecov.io/gh/securego/gosec/branch/master/graph/badge.svg)](https://codecov.io/gh/securego/gosec)
19-
[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/badge/github.com/securego/gosec)
19+
[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/report/github.com/securego/gosec)
2020
[![GoDoc](https://godoc.org/github.com/securego/gosec?status.svg)](https://godoc.org/github.com/securego/gosec)
2121
[![Docs](https://readthedocs.org/projects/docs/badge/?version=latest)](https://securego.io/)
2222
[![Downloads](https://img.shields.io/github/downloads/securego/gosec/total.svg)](https://github.com/securego/gosec/releases)

analyzer_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ var _ = Describe("Analyzer", func() {
366366
It("should properly parse the errors", func() {
367367
pkg := &packages.Package{
368368
Errors: []packages.Error{
369-
packages.Error{
369+
{
370370
Pos: "file:1:2",
371371
Msg: "build error",
372372
},
@@ -387,7 +387,7 @@ var _ = Describe("Analyzer", func() {
387387
It("should properly parse the errors without line and column", func() {
388388
pkg := &packages.Package{
389389
Errors: []packages.Error{
390-
packages.Error{
390+
{
391391
Pos: "file",
392392
Msg: "build error",
393393
},
@@ -408,7 +408,7 @@ var _ = Describe("Analyzer", func() {
408408
It("should properly parse the errors without column", func() {
409409
pkg := &packages.Package{
410410
Errors: []packages.Error{
411-
packages.Error{
411+
{
412412
Pos: "file",
413413
Msg: "build error",
414414
},
@@ -429,7 +429,7 @@ var _ = Describe("Analyzer", func() {
429429
It("should return error when line cannot be parsed", func() {
430430
pkg := &packages.Package{
431431
Errors: []packages.Error{
432-
packages.Error{
432+
{
433433
Pos: "file:line",
434434
Msg: "build error",
435435
},
@@ -442,7 +442,7 @@ var _ = Describe("Analyzer", func() {
442442
It("should return error when column cannot be parsed", func() {
443443
pkg := &packages.Package{
444444
Errors: []packages.Error{
445-
packages.Error{
445+
{
446446
Pos: "file:1:column",
447447
Msg: "build error",
448448
},
@@ -455,11 +455,11 @@ var _ = Describe("Analyzer", func() {
455455
It("should append error to the same file", func() {
456456
pkg := &packages.Package{
457457
Errors: []packages.Error{
458-
packages.Error{
458+
{
459459
Pos: "file:1:2",
460460
Msg: "error1",
461461
},
462-
packages.Error{
462+
{
463463
Pos: "file:3:4",
464464
Msg: "error2",
465465
},
@@ -507,7 +507,7 @@ var _ = Describe("Analyzer", func() {
507507
It("should add a new error", func() {
508508
pkg := &packages.Package{
509509
Errors: []packages.Error{
510-
packages.Error{
510+
{
511511
Pos: "file:1:2",
512512
Msg: "build error",
513513
},

helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
var _ = Describe("Helpers", func() {
17-
Context("when listing pacakge paths", func() {
17+
Context("when listing package paths", func() {
1818
var dir string
1919
JustBeforeEach(func() {
2020
var err error

report/sarif/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
//WriteReport write a report in SARIF format to the output writer
10-
func WriteReport(w io.Writer, data *core.ReportInfo,rootPaths []string) error {
10+
func WriteReport(w io.Writer, data *core.ReportInfo, rootPaths []string) error {
1111
sr, err := GenerateReport(rootPaths, data)
1212
if err != nil {
1313
return err

rules/subproc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (r *subprocess) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) {
6161
}
6262

6363
// isContext checks whether or not the node is a CommandContext call or not
64-
// Thi is requried in order to skip the first argument from the check.
64+
// Thi is required in order to skip the first argument from the check.
6565
func (r *subprocess) isContext(n ast.Node, ctx *gosec.Context) bool {
6666
selector, indent, err := gosec.GetCallInfo(n, ctx)
6767
if err != nil {

testutils/source.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ func main(){
857857
}
858858
defer rows.Close()
859859
}`}, 1, gosec.NewConfig()}, {[]string{`
860-
// Format string without proper quoting with transation
860+
// Format string without proper quoting with transaction
861861
package main
862862
import (
863863
"context"
@@ -1027,7 +1027,7 @@ func main(){
10271027
}
10281028
defer rows.Close()
10291029
}`}, 1, gosec.NewConfig()}, {[]string{`
1030-
// DB transation check
1030+
// DB transaction check
10311031
package main
10321032
import (
10331033
"context"

0 commit comments

Comments
 (0)