Skip to content

Commit

Permalink
Fix #164: update GAS to the latest gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
jirfag committed Sep 1, 2018
1 parent a26f24b commit b1f5c88
Show file tree
Hide file tree
Showing 60 changed files with 2,492 additions and 454 deletions.
44 changes: 30 additions & 14 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
branch = "fix-crash-on-nil-constant"
source = "github.com/golangci/unparam"

[[constraint]]
name = "github.com/GoASTScanner/gas"
branch = "master"
source = "github.com/golangci/gas"

[prune]
go-tests = true
unused-packages = true
Expand Down
8 changes: 4 additions & 4 deletions pkg/golinters/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"log"
"strconv"

"github.com/GoASTScanner/gas"
"github.com/GoASTScanner/gas/rules"
"github.com/golangci/golangci-lint/pkg/lint/linter"
"github.com/golangci/golangci-lint/pkg/result"
"github.com/golangci/gosec"
"github.com/golangci/gosec/rules"
)

type Gosec struct{}
Expand All @@ -25,10 +25,10 @@ func (Gosec) Desc() string {
}

func (lint Gosec) Run(ctx context.Context, lintCtx *linter.Context) ([]result.Issue, error) {
gasConfig := gas.NewConfig()
gasConfig := gosec.NewConfig()
enabledRules := rules.Generate()
logger := log.New(ioutil.Discard, "", 0)
analyzer := gas.NewAnalyzer(gasConfig, logger)
analyzer := gosec.NewAnalyzer(gasConfig, logger)
analyzer.LoadRules(enabledRules.Builders())

analyzer.ProcessProgram(lintCtx.Program)
Expand Down
8 changes: 0 additions & 8 deletions vendor/github.com/GoASTScanner/gas/Dockerfile

This file was deleted.

48 changes: 0 additions & 48 deletions vendor/github.com/GoASTScanner/gas/Makefile

This file was deleted.

63 changes: 0 additions & 63 deletions vendor/github.com/GoASTScanner/gas/rules/readfile.go

This file was deleted.

12 changes: 12 additions & 0 deletions vendor/github.com/golang/mock/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions vendor/github.com/golang/mock/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b1f5c88

Please sign in to comment.