Skip to content

Commit

Permalink
Fix typos, Go Report link and Gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed May 7, 2021
1 parent f4ea33d commit 4df7f1c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You may obtain a copy of the License [here](http://www.apache.org/licenses/LICEN
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3218/badge)](https://bestpractices.coreinfrastructure.org/projects/3218)
[![Build Status](https://github.com/securego/gosec/workflows/CI/badge.svg)](https://github.com/securego/gosec/actions?query=workflows%3ACI)
[![Coverage Status](https://codecov.io/gh/securego/gosec/branch/master/graph/badge.svg)](https://codecov.io/gh/securego/gosec)
[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/badge/github.com/securego/gosec)
[![GoReport](https://goreportcard.com/badge/github.com/securego/gosec)](https://goreportcard.com/report/github.com/securego/gosec)
[![GoDoc](https://godoc.org/github.com/securego/gosec?status.svg)](https://godoc.org/github.com/securego/gosec)
[![Docs](https://readthedocs.org/projects/docs/badge/?version=latest)](https://securego.io/)
[![Downloads](https://img.shields.io/github/downloads/securego/gosec/total.svg)](https://github.com/securego/gosec/releases)
Expand Down
16 changes: 8 additions & 8 deletions analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ var _ = Describe("Analyzer", func() {
It("should properly parse the errors", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file:1:2",
Msg: "build error",
},
Expand All @@ -387,7 +387,7 @@ var _ = Describe("Analyzer", func() {
It("should properly parse the errors without line and column", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file",
Msg: "build error",
},
Expand All @@ -408,7 +408,7 @@ var _ = Describe("Analyzer", func() {
It("should properly parse the errors without column", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file",
Msg: "build error",
},
Expand All @@ -429,7 +429,7 @@ var _ = Describe("Analyzer", func() {
It("should return error when line cannot be parsed", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file:line",
Msg: "build error",
},
Expand All @@ -442,7 +442,7 @@ var _ = Describe("Analyzer", func() {
It("should return error when column cannot be parsed", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file:1:column",
Msg: "build error",
},
Expand All @@ -455,11 +455,11 @@ var _ = Describe("Analyzer", func() {
It("should append error to the same file", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file:1:2",
Msg: "error1",
},
packages.Error{
{
Pos: "file:3:4",
Msg: "error2",
},
Expand Down Expand Up @@ -507,7 +507,7 @@ var _ = Describe("Analyzer", func() {
It("should add a new error", func() {
pkg := &packages.Package{
Errors: []packages.Error{
packages.Error{
{
Pos: "file:1:2",
Msg: "build error",
},
Expand Down
2 changes: 1 addition & 1 deletion helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

var _ = Describe("Helpers", func() {
Context("when listing pacakge paths", func() {
Context("when listing package paths", func() {
var dir string
JustBeforeEach(func() {
var err error
Expand Down
2 changes: 1 addition & 1 deletion report/sarif/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

//WriteReport write a report in SARIF format to the output writer
func WriteReport(w io.Writer, data *core.ReportInfo,rootPaths []string) error {
func WriteReport(w io.Writer, data *core.ReportInfo, rootPaths []string) error {
sr, err := GenerateReport(rootPaths, data)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion rules/subproc.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (r *subprocess) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) {
}

// isContext checks whether or not the node is a CommandContext call or not
// Thi is requried in order to skip the first argument from the check.
// Thi is required in order to skip the first argument from the check.
func (r *subprocess) isContext(n ast.Node, ctx *gosec.Context) bool {
selector, indent, err := gosec.GetCallInfo(n, ctx)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions testutils/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ func main(){
}
defer rows.Close()
}`}, 1, gosec.NewConfig()}, {[]string{`
// Format string without proper quoting with transation
// Format string without proper quoting with transaction
package main
import (
"context"
Expand Down Expand Up @@ -1027,7 +1027,7 @@ func main(){
}
defer rows.Close()
}`}, 1, gosec.NewConfig()}, {[]string{`
// DB transation check
// DB transaction check
package main
import (
"context"
Expand Down

0 comments on commit 4df7f1c

Please sign in to comment.