forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpl_busl.yml
54 lines (53 loc) · 1.64 KB
/
mpl_busl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
rules:
- id: "mpl_busl"
patterns:
- pattern-either:
- pattern-inside: |
...
// SPDX-License-Identifier: MPL-2.0
...
package $A
...
import (
...
...
)
...
- pattern-inside: |
...
// SPDX-License-Identifier: MPL-2.0
...
package $A
...
import ...
...
- pattern: |
"github.com/hashicorp/nomad/$...B"
- metavariable-pattern:
metavariable: $...B
patterns:
# List of MPL-2.0 packages that are allowed to be imported.
# Command to find packages:
# find . -name LICENSE ! -path '*node_modules*' | sort
- pattern-not: "api..."
- pattern-not: "demo..."
- pattern-not: "drivers/shared..."
- pattern-not: "helper/crypto..."
- pattern-not: "helper/grpc-middleware..."
- pattern-not: "helper/pluginutils/grpcutils..."
- pattern-not: "helper/pluginutils/hclspecutils..."
- pattern-not: "helper/pointer..."
- pattern-not: "helper/testlog..."
- pattern-not: "helper/uuid..."
- pattern-not: "jobspec..."
- pattern-not: "jobspec2..."
- pattern-not: "plugins..."
message: "BUSL package `github.com/hashicorp/nomad/$...B` imported in MPL package `$A`"
languages:
- "generic"
paths:
exclude:
- "*_test.go"
severity: "ERROR"