File tree Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ $ docker build --check .
97
97
<td>FROM --platform flag should not use a constant value</td>
98
98
</tr>
99
99
<tr>
100
- <td><a href="./copy-ignored-file/">CopyIgnoredFile</a></td>
100
+ <td><a href="./copy-ignored-file/">CopyIgnoredFile (experimental) </a></td>
101
101
<td>Attempting to Copy file that is excluded by .dockerignore</td>
102
102
</tr>
103
103
</tbody >
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ aliases:
5
5
- /go/dockerfile/rule/copy-ignored-file/
6
6
---
7
7
8
+ > ** Note**
9
+ >
10
+ > This check is experimental and is not enabled by default. To enable it, see
11
+ > [ Experimental checks] ( https://docs.docker.com/go/build-checks-experimental/ ) .
12
+
8
13
## Output
9
14
10
15
``` text
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ $ docker build --check .
30
30
<tbody >
31
31
{{- range .Rules }}
32
32
<tr>
33
- <td><a href="./{{ .PageName }}/">{{ .Name }}</a></td>
33
+ <td><a href="./{{ .PageName }}/">{{ .Name }}{{- if .Experimental }} (experimental){{- end}} </a></td>
34
34
<td>{{ .Description }}</td>
35
35
</tr>
36
36
{{- end }}
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ import (
20
20
)
21
21
22
22
type Rule struct {
23
- Name string
24
- Description string
25
- URL * url.URL
26
- PageName string
27
- URLAlias string
23
+ Name string
24
+ Description string
25
+ URL * url.URL
26
+ PageName string
27
+ URLAlias string
28
+ Experimental bool
28
29
}
29
30
30
31
const tmplStr = `---
@@ -35,6 +36,13 @@ aliases:
35
36
- {{ .Rule.URLAlias }}
36
37
{{- end }}
37
38
---
39
+ {{- if .Rule.Experimental }}
40
+
41
+ > **Note**
42
+ >
43
+ > This check is experimental and is not enabled by default. To enable it, see
44
+ > [Experimental checks](https://docs.docker.com/go/build-checks-experimental/).
45
+ {{- end }}
38
46
39
47
{{ .Content }}
40
48
`
@@ -160,6 +168,10 @@ func listRules() ([]Rule, error) {
160
168
}
161
169
rule .URL = u
162
170
}
171
+ case "Experimental" :
172
+ if basicLit , ok := kv .Value .(* ast.Ident ); ok {
173
+ rule .Experimental = basicLit .Name == "true"
174
+ }
163
175
}
164
176
}
165
177
}
You can’t perform that action at this time.
0 commit comments