Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh actions dependabot #108

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Generate mocks
run: go generate ./...

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: --disable unused --timeout 5m --skip-files _test.go
version: v1.51
32 changes: 32 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
run:
timeout: 5m
skip-files:
- '(.+)_test\.go'

linters:
disable-all: false
enable:
- exportloopref
disable:
- errorlint
- exhaustive
- dogsled
- whitespace
- gosec
- dupl
- wsl
- funlen
- scopelint
- bodyclose
- contextcheck
- nilerr
- noctx
- rowserrcheck
- sqlclosecheck
- structcheck
- unparam
- musttag
- unused
presets:
- bugs
fast: false
9 changes: 6 additions & 3 deletions config/codecommunicator/junos.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package codecommunicator
import (
"context"
"fmt"
"regexp"
"strings"

"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/deviceclass/groupproperty"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"regexp"
"strings"
)

type junosCommunicator struct {
Expand Down Expand Up @@ -308,13 +309,15 @@ func (c *junosCommunicator) getRoutingEngineIndices(ctx context.Context) ([]inde
}

var indices []indexAndLabel
regex := regexp.MustCompile("(?i)engine")

for _, response := range jnxOperatingDescr {
res, err := response.GetValue()
if err != nil {
return nil, errors.Wrap(err, "failed to get string value of snmp response")
}

if ok, err = regexp.MatchString("(?i)engine", res.String()); err == nil && ok {
if ok = regex.MatchString(res.String()); ok {
indices = append(indices, indexAndLabel{
index: strings.TrimPrefix(response.GetOID().String(), jnxOperatingDescrOID.String()),
label: res.String(),
Expand Down
52 changes: 32 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ module github.com/inexio/thola
go 1.16

require (
github.com/dgraph-io/badger/v2 v2.2007.2
github.com/go-resty/resty/v2 v2.3.0
github.com/go-sql-driver/mysql v1.5.0
github.com/gocarina/gocsv v0.0.0-20210516172204-ca9e8a8ddea8
github.com/golang/protobuf v1.5.2 // indirect
github.com/gomodule/redigo v1.8.4
github.com/google/go-cmp v0.5.5
github.com/gosnmp/gosnmp v1.30.0
github.com/dgraph-io/badger/v2 v2.2007.4
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-resty/resty/v2 v2.7.0
github.com/go-sql-driver/mysql v1.7.1
github.com/gocarina/gocsv v0.0.0-20230406101422-6445c2b15027
github.com/golang/glog v1.1.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomodule/redigo v1.8.9
github.com/google/go-cmp v0.5.9
github.com/gosnmp/gosnmp v1.35.0
github.com/inexio/go-monitoringplugin v1.0.13
github.com/jmoiron/sqlx v1.2.0
github.com/labstack/echo/v4 v4.6.1
github.com/jmoiron/sqlx v1.3.5
github.com/klauspost/compress v1.16.5 // indirect
github.com/labstack/echo/v4 v4.10.2
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
github.com/mitchellh/mapstructure v1.3.3
github.com/mitchellh/mapstructure v1.5.0
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pkg/errors v0.9.1
github.com/rs/xid v1.2.1
github.com/rs/zerolog v1.20.0
github.com/rs/xid v1.5.0
github.com/rs/zerolog v1.29.1
github.com/schollz/progressbar/v3 v3.5.1
github.com/shopspring/decimal v1.2.0
github.com/spf13/cobra v1.0.0
github.com/shopspring/decimal v1.3.1
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/ulule/limiter/v3 v3.5.0
golang.org/x/text v0.3.7
gopkg.in/yaml.v2 v2.3.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.2
github.com/ulule/limiter/v3 v3.11.1
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/text v0.9.0
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0
)
Loading