dockerfile-analyzer 0.4.2__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/.github/workflows/CI.yml +21 -11
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/Cargo.lock +13 -13
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/Cargo.toml +2 -2
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/PKG-INFO +1 -1
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/src/models.rs +6 -6
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/.cargo/config.toml +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/.github/dependabot.yml +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/.gitignore +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/LICENSE +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/README.md +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/dockerfile_analyzer.pyi +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/example.py +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/py.typed +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/pyproject.toml +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/requirements-dev.txt +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/src/analyzer.rs +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/src/constants.rs +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/src/lib.rs +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/src/parse_utils.rs +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/tests/fixtures/multistage.Dockerfile +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/tests/test_analyze_dockerfile.py +0 -0
- {dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/tests/test_stages.py +0 -0
|
@@ -25,7 +25,8 @@ jobs:
|
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
26
|
steps:
|
|
27
27
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
|
-
-
|
|
28
|
+
- id: setup-python
|
|
29
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
29
30
|
with:
|
|
30
31
|
# Keep in sync with requires-python in pyproject.toml (PyO3 needs a
|
|
31
32
|
# matching libpython for clippy on --all-targets).
|
|
@@ -35,7 +36,11 @@ jobs:
|
|
|
35
36
|
# A commit pin does not get the branch-name default of stable.
|
|
36
37
|
toolchain: stable
|
|
37
38
|
components: rustfmt, clippy
|
|
38
|
-
- uses: Swatinem/rust-cache@
|
|
39
|
+
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
40
|
+
with:
|
|
41
|
+
# pyo3-build-config caches the interpreter path; a runner Python patch
|
|
42
|
+
# bump (e.g. 3.14.8 -> 3.14.9) otherwise leaves a stale -L path.
|
|
43
|
+
key: python-${{ steps.setup-python.outputs.python-version }}
|
|
39
44
|
- name: Check formatting
|
|
40
45
|
run: cargo fmt --all -- --check
|
|
41
46
|
- name: Clippy
|
|
@@ -49,7 +54,8 @@ jobs:
|
|
|
49
54
|
runs-on: ubuntu-latest
|
|
50
55
|
steps:
|
|
51
56
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
52
|
-
-
|
|
57
|
+
- id: setup-python
|
|
58
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
53
59
|
with:
|
|
54
60
|
# Keep in sync with requires-python in pyproject.toml (PyO3 needs a
|
|
55
61
|
# matching libpython for linking the test binary).
|
|
@@ -58,7 +64,11 @@ jobs:
|
|
|
58
64
|
with:
|
|
59
65
|
# A commit pin does not get the branch-name default of stable.
|
|
60
66
|
toolchain: stable
|
|
61
|
-
- uses: Swatinem/rust-cache@
|
|
67
|
+
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
68
|
+
with:
|
|
69
|
+
# pyo3-build-config caches the interpreter path; a runner Python patch
|
|
70
|
+
# bump (e.g. 3.14.8 -> 3.14.9) otherwise leaves a stale -L path.
|
|
71
|
+
key: python-${{ steps.setup-python.outputs.python-version }}
|
|
62
72
|
- name: Run tests
|
|
63
73
|
run: cargo test
|
|
64
74
|
env:
|
|
@@ -70,7 +80,7 @@ jobs:
|
|
|
70
80
|
runs-on: ubuntu-latest
|
|
71
81
|
steps:
|
|
72
82
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
73
|
-
- uses: actions/setup-python@
|
|
83
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
74
84
|
with:
|
|
75
85
|
# Keep in sync with requires-python in pyproject.toml.
|
|
76
86
|
python-version: "3.14"
|
|
@@ -78,7 +88,7 @@ jobs:
|
|
|
78
88
|
with:
|
|
79
89
|
# A commit pin does not get the branch-name default of stable.
|
|
80
90
|
toolchain: stable
|
|
81
|
-
- uses: Swatinem/rust-cache@
|
|
91
|
+
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
82
92
|
- name: Install dev dependencies
|
|
83
93
|
run: |
|
|
84
94
|
python -m venv .venv
|
|
@@ -114,7 +124,7 @@ jobs:
|
|
|
114
124
|
target: ppc64le
|
|
115
125
|
steps:
|
|
116
126
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
117
|
-
- uses: actions/setup-python@
|
|
127
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
118
128
|
with:
|
|
119
129
|
python-version: 3.x
|
|
120
130
|
- name: Build wheels
|
|
@@ -147,7 +157,7 @@ jobs:
|
|
|
147
157
|
target: armv7
|
|
148
158
|
steps:
|
|
149
159
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
150
|
-
- uses: actions/setup-python@
|
|
160
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
151
161
|
with:
|
|
152
162
|
python-version: 3.x
|
|
153
163
|
- name: Build wheels
|
|
@@ -176,7 +186,7 @@ jobs:
|
|
|
176
186
|
target: x86
|
|
177
187
|
steps:
|
|
178
188
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
179
|
-
- uses: actions/setup-python@
|
|
189
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
180
190
|
with:
|
|
181
191
|
python-version: 3.x
|
|
182
192
|
architecture: ${{ matrix.platform.target }}
|
|
@@ -205,7 +215,7 @@ jobs:
|
|
|
205
215
|
target: aarch64
|
|
206
216
|
steps:
|
|
207
217
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
208
|
-
- uses: actions/setup-python@
|
|
218
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
209
219
|
with:
|
|
210
220
|
python-version: 3.x
|
|
211
221
|
- name: Build wheels
|
|
@@ -259,7 +269,7 @@ jobs:
|
|
|
259
269
|
subject-path: "wheels-*/*"
|
|
260
270
|
- name: Install uv
|
|
261
271
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
262
|
-
uses: astral-sh/setup-uv@
|
|
272
|
+
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
|
|
263
273
|
- name: Publish to PyPI
|
|
264
274
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
265
275
|
run: uv publish --trusted-publishing always 'wheels-*/*'
|
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
|
14
14
|
|
|
15
15
|
[[package]]
|
|
16
16
|
name = "dockerfile-analyzer"
|
|
17
|
-
version = "0.4.
|
|
17
|
+
version = "0.4.4"
|
|
18
18
|
dependencies = [
|
|
19
19
|
"docker-image",
|
|
20
20
|
"parse-dockerfile",
|
|
@@ -72,9 +72,9 @@ dependencies = [
|
|
|
72
72
|
|
|
73
73
|
[[package]]
|
|
74
74
|
name = "pyo3"
|
|
75
|
-
version = "0.
|
|
75
|
+
version = "0.30.1"
|
|
76
76
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
77
|
-
checksum = "
|
|
77
|
+
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
|
|
78
78
|
dependencies = [
|
|
79
79
|
"libc",
|
|
80
80
|
"once_cell",
|
|
@@ -86,18 +86,18 @@ dependencies = [
|
|
|
86
86
|
|
|
87
87
|
[[package]]
|
|
88
88
|
name = "pyo3-build-config"
|
|
89
|
-
version = "0.
|
|
89
|
+
version = "0.30.1"
|
|
90
90
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
91
|
-
checksum = "
|
|
91
|
+
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
|
|
92
92
|
dependencies = [
|
|
93
93
|
"target-lexicon",
|
|
94
94
|
]
|
|
95
95
|
|
|
96
96
|
[[package]]
|
|
97
97
|
name = "pyo3-ffi"
|
|
98
|
-
version = "0.
|
|
98
|
+
version = "0.30.1"
|
|
99
99
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
-
checksum = "
|
|
100
|
+
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
|
|
101
101
|
dependencies = [
|
|
102
102
|
"libc",
|
|
103
103
|
"pyo3-build-config",
|
|
@@ -105,9 +105,9 @@ dependencies = [
|
|
|
105
105
|
|
|
106
106
|
[[package]]
|
|
107
107
|
name = "pyo3-macros"
|
|
108
|
-
version = "0.
|
|
108
|
+
version = "0.30.1"
|
|
109
109
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
-
checksum = "
|
|
110
|
+
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
|
|
111
111
|
dependencies = [
|
|
112
112
|
"proc-macro2",
|
|
113
113
|
"pyo3-macros-backend",
|
|
@@ -117,9 +117,9 @@ dependencies = [
|
|
|
117
117
|
|
|
118
118
|
[[package]]
|
|
119
119
|
name = "pyo3-macros-backend"
|
|
120
|
-
version = "0.
|
|
120
|
+
version = "0.30.1"
|
|
121
121
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
-
checksum = "
|
|
122
|
+
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
|
|
123
123
|
dependencies = [
|
|
124
124
|
"heck",
|
|
125
125
|
"proc-macro2",
|
|
@@ -175,9 +175,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
|
175
175
|
|
|
176
176
|
[[package]]
|
|
177
177
|
name = "syn"
|
|
178
|
-
version = "
|
|
178
|
+
version = "3.0.9"
|
|
179
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
180
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
181
181
|
dependencies = [
|
|
182
182
|
"proc-macro2",
|
|
183
183
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "dockerfile-analyzer"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.4"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ name = "dockerfile_analyzer"
|
|
|
10
10
|
crate-type = ["cdylib"]
|
|
11
11
|
|
|
12
12
|
[dependencies]
|
|
13
|
-
pyo3 = "0.
|
|
13
|
+
pyo3 = "0.30.1"
|
|
14
14
|
docker-image = {version = "0.2.1"}
|
|
15
15
|
parse-dockerfile = { version = "0.1.7", default-features = false }
|
|
16
16
|
shlex = "2.0.1"
|
|
@@ -18,7 +18,7 @@ fn fmt_opt_map(map: &BTreeMap<String, Option<String>>) -> String {
|
|
|
18
18
|
format!("{{{body}}}")
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
#[pyclass
|
|
21
|
+
#[pyclass]
|
|
22
22
|
#[doc = "Instructions and their counts.
|
|
23
23
|
|
|
24
24
|
Counts are keyed by the Dockerfile instruction name (`FROM`, `RUN`, ...).
|
|
@@ -50,7 +50,7 @@ impl InstructionStats {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
#[pyclass
|
|
53
|
+
#[pyclass]
|
|
54
54
|
#[doc = "Parsed components of a Docker image reference.
|
|
55
55
|
|
|
56
56
|
Attributes:
|
|
@@ -93,7 +93,7 @@ impl ImageComponents {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
#[pyclass
|
|
96
|
+
#[pyclass]
|
|
97
97
|
#[doc = "Information about a Docker image used in a Dockerfile.
|
|
98
98
|
|
|
99
99
|
Attributes:
|
|
@@ -131,7 +131,7 @@ impl Image {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
#[pyclass
|
|
134
|
+
#[pyclass]
|
|
135
135
|
#[doc = "How named stages are referenced by later instructions.
|
|
136
136
|
|
|
137
137
|
`is_multistage` is true when the Dockerfile has at least two stages and a
|
|
@@ -181,7 +181,7 @@ impl MultistageAnalysis {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
#[pyclass
|
|
184
|
+
#[pyclass]
|
|
185
185
|
#[doc = "One build stage, from its `FROM` line to the next `FROM`.
|
|
186
186
|
|
|
187
187
|
Values are the stage's own, as written in that stage. Nothing is inherited
|
|
@@ -273,7 +273,7 @@ impl Stage {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
#[pyclass
|
|
276
|
+
#[pyclass]
|
|
277
277
|
#[doc = "Analysis of one Dockerfile.
|
|
278
278
|
|
|
279
279
|
Image references that do not contain `$` are lowercased, so `Ubuntu:22.04`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dockerfile_analyzer-0.4.2 → dockerfile_analyzer-0.4.4}/tests/fixtures/multistage.Dockerfile
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|