Fix typos, Go Report link and Gofmt

This commit is contained in:
Matthieu MOREL 2021-05-07 18:04:01 +02:00 committed by GitHub
parent f4ea33d5f8
commit 4df7f1c3e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 14 deletions

View file

@ -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)

View file

@ -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",
},
@ -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",
},
@ -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",
},
@ -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",
},
@ -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",
},
@ -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",
},
@ -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",
},

View file

@ -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

View file

@ -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

View file

@ -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 {

View file

@ -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"
@ -1027,7 +1027,7 @@ func main(){
}
defer rows.Close()
}`}, 1, gosec.NewConfig()}, {[]string{`
// DB transation check
// DB transaction check
package main
import (
"context"