You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ansiblelint/rules/galaxy.py
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ class GalaxyRule(AnsibleLintRule):
36
36
"galaxy[version-missing]": "galaxy.yaml should have version tag.",
37
37
"galaxy[no-runtime]": "meta/runtime.yml file not found.",
38
38
"galaxy[invalid-dependency-version]": "Invalid collection metadata. Dependency version spec range is invalid",
39
+
"galaxy[no-repository]": "galaxy.yaml should have a repository key for publication to Galaxy. See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html",
40
+
"galaxy[no-license]": "galaxy.yaml should have a license or license_file key for publication to Galaxy. See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html",
# Check for repository key - recommended for Galaxy publication
185
+
if"repository"notindata:
186
+
results.append(
187
+
self.create_matcherror(
188
+
message="galaxy.yaml should have a repository key for publication to Galaxy. See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html",
189
+
tag="galaxy[no-repository]",
190
+
filename=file,
191
+
),
192
+
)
193
+
194
+
# Check for license or license_file key - recommended for Galaxy publication
195
+
if"license"notindataand"license_file"notindata:
196
+
results.append(
197
+
self.create_matcherror(
198
+
message="galaxy.yaml should have a license or license_file key for publication to Galaxy. See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html",
0 commit comments