Skip to content

Commit ce806fb

Browse files
committed
Update Snapcraft catalog entry
Also fix an EOF.
1 parent c2edda0 commit ce806fb

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.pre-commit-hooks.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,10 @@
211211
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
212212
- id: check-snapcraft
213213
name: Validate snapcraft files
214-
description: 'Validate snapcraft files against the schema provided by SchemaStore'
214+
description: 'Validate snapcraft files against the schema provided by Canonical'
215215
entry: check-jsonschema --builtin-schema vendor.snapcraft
216216
language: python
217-
files: >
218-
(?x)^(
219-
([^/]*/)*snapcraft.yaml
220-
)$
217+
files: ^(.+/)?snapcraft\.yaml$
221218
types: [yaml]
222219

223220
# this hook is autogenerated from a script

docs/precommit_usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Validate Renovate config against the schema provided by Renovate (does not suppo
256256
``check-snapcraft``
257257
~~~~~~~~~~~~~~~~~~~
258258

259-
Validate snapcraft files against the schema provided by SchemaStore
259+
Validate snapcraft files against the schema provided by Canonical
260260

261261
.. code-block:: yaml
262262
:caption: example config

src/check_jsonschema/catalog.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
218218
),
219219
"hook_config": {
220220
"name": "Validate snapcraft files",
221-
"files": [r"([^/]*/)*snapcraft.yaml"],
221+
"description": (
222+
"Validate snapcraft files against the schema provided by Canonical"
223+
),
224+
"files": r"^(.+/)?snapcraft\.yaml$",
222225
"types": "yaml",
223226
},
224227
},

tests/example-files/hooks/positive/snapcraft/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ apps:
1212
parts:
1313
gnu-hello:
1414
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
15-
plugin: autotools
15+
plugin: autotools

0 commit comments

Comments
 (0)