Commit aa8306b
authored
Add a config option to suppress
Thank you for the nice project!
This is my first PR for this project.
Therefore if I have any mistakes for contribution, please let me know...
---
There are several reasons you might want this:
1. If the `allow` list represents the set sources for a project that
have gone through some external approval process, such as vetting it
with a legal department.
2. You're checking a single project in a workspace that shares its
`deny.toml` for all members, but not all members have identical
dependency sets.
3. You'd like to use `deny.toml` as part of a project template, and
configure it with some default set of sources you find acceptable
4. ... others, for sure...
As it is, this warning isn't a huge deal, but is annoying/unhelpful if
you don't care about it. I suspect that it's useful for catching typos
or keeping configuration tight (and so I think "warn" is the right
default for it), but there are enough reasons to want to turn it off
that it seems justified to me for it to be an option.
It was easy to add support for a config property which controls the lint
level for this check, so I just did that. I guess setting it to `deny`
could be desirable in some cases, although it seems a little dodgy to me
for various reasons... That said, I didn't see a reason to forbid that
sort of thing, and allowing it to be configured as a `LintLevel` seemed
more consistent.
### Additional Information
- This PR is for #781
- This PR modification is very similar with #368
- config name, `unused-allowed-source` is inspired by
`licenses.unused-allowed-licens` in #368unmatched-source (#782)1 parent 6e82d44 commit aa8306b
File tree
7 files changed
+23
-1
lines changed- docs/src/checks/sources
- src
- sources
- snapshots
- tests/cfg
7 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
| 245 | + | |
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments