mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
In the spirit of #25909, this PR removes testify dependencies from the scheduler package, along with reflect.DeepEqual removal. This is again a combination of semgrep and hx editing magic. --------- Co-authored-by: Tim Gross <tgross@hashicorp.com>
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
rules:
|
|
- id: "disallow-imports"
|
|
pattern-either:
|
|
- pattern: import "github.com/boltdb/bolt"
|
|
- pattern: import "github.com/pkg/errors"
|
|
- pattern: import "=~/github.com\/hashicorp\/consul$/"
|
|
- pattern: import "github.com/hashicorp/consul/command/flags"
|
|
- pattern: import "=~/github.com\/hashicorp\/consul\/sdk$/"
|
|
- pattern: import "=~/github.com\/hashicorp\/go-set$/"
|
|
- pattern: import "github.com/mitchellh/cli"
|
|
- pattern: import "golang.org/x/exp/slices"
|
|
- pattern: import "golang.org/x/exp/maps"
|
|
- pattern: import "golang.org/x/exp/constraints"
|
|
message: "Import of this package has been disallowed"
|
|
languages: [go]
|
|
severity: "ERROR"
|
|
paths:
|
|
include:
|
|
- "*.go"
|
|
|
|
- id: "disallow-new-testify-imports"
|
|
pattern: import "github.com/stretchr/testify"
|
|
message: "Do not import testify in packages where it has been removed"
|
|
languages: [go]
|
|
severity: "ERROR"
|
|
paths:
|
|
include:
|
|
- "nomad/state/*_test.go"
|
|
- "nomad/scheduler/*_test.go"
|