Commit d4e025a
committed
linter: do not attempt to check for copying ignored file when negated patterns exist
It becomes too difficult to statically check whether a source path is an
error or expected when negated patterns are involved. This is because a
pattern may point to a directory and may exclude the directory, but a
further pattern may exclude a specific pattern in that directory.
In order to determine whether this happened when copying a source
directory, we'd need to either have some knowledge of the actual files
copied (wouldn't be a static pattern) or we would need to go through
each exclusion and try to determine if there exists a certain text that
would match both the original pattern and the excluded pattern.
This is likely too difficult or too computationally intense for what's
meant to be a simple linter check so just disable this linter check when
exclusions exist.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>1 parent c5cee9e commit d4e025a
File tree
2 files changed
+17
-1
lines changed- frontend/dockerfile
- dockerfile2llb
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2041 | 2041 | | |
2042 | 2042 | | |
2043 | 2043 | | |
2044 | | - | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
2045 | 2051 | | |
2046 | 2052 | | |
2047 | 2053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
0 commit comments