Skip to content

Commit e50de87

Browse files
authored
Merge pull request #325 from skwde/fix-catalog-regex
fix: several file ending dots in catalog file regex(. -> \.)
2 parents 29c0e44 + 2308b5b commit e50de87

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

.pre-commit-hooks.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
description: 'Validate Azure Pipelines config against the schema provided by Microsoft'
2727
entry: check-jsonschema --builtin-schema vendor.azure-pipelines --data-transform azure-pipelines
2828
language: python
29-
files: ^(\.)?azure-pipelines.(yml|yaml)$
29+
files: ^(\.)?azure-pipelines\.(yml|yaml)$
3030
types: [yaml]
3131

3232
# this hook is autogenerated from a script
@@ -76,7 +76,7 @@
7676
description: 'Validate Dependabot Config (v2) against the schema provided by SchemaStore'
7777
entry: check-jsonschema --builtin-schema vendor.dependabot
7878
language: python
79-
files: ^\.github/dependabot.(yml|yaml)$
79+
files: ^\.github/dependabot\.(yml|yaml)$
8080
types: [yaml]
8181

8282
# this hook is autogenerated from a script
@@ -100,8 +100,8 @@
100100
language: python
101101
files: >
102102
(?x)^(
103-
action.(yml|yaml)|
104-
\.github/actions/(.+/)?action.(yml|yaml)
103+
action\.(yml|yaml)|
104+
\.github/actions/(.+/)?action\.(yml|yaml)
105105
)$
106106
types: [yaml]
107107

@@ -124,7 +124,7 @@
124124
description: 'Validate GitLab CI config against the schema provided by SchemaStore'
125125
entry: check-jsonschema --builtin-schema vendor.gitlab-ci --data-transform gitlab-ci
126126
language: python
127-
files: ^.*\.gitlab-ci.yml$
127+
files: ^.*\.gitlab-ci\.yml$
128128
types: [yaml]
129129

130130
# this hook is autogenerated from a script
@@ -135,7 +135,7 @@
135135
description: 'Validate ReadTheDocs config against the schema provided by ReadTheDocs'
136136
entry: check-jsonschema --builtin-schema vendor.readthedocs
137137
language: python
138-
files: ^\.readthedocs.(yml|yaml)$
138+
files: ^\.readthedocs\.(yml|yaml)$
139139
types: [yaml]
140140

141141
# this hook is autogenerated from a script
@@ -161,5 +161,5 @@
161161
description: 'Validate Travis Config against the schema provided by SchemaStore'
162162
entry: check-jsonschema --builtin-schema vendor.travis
163163
language: python
164-
files: ^\.travis.(yml|yaml)$
164+
files: ^\.travis\.(yml|yaml)$
165165
types: [yaml]

src/check_jsonschema/catalog.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
3030
"description": "Validate Azure Pipelines config against the schema provided "
3131
"by Microsoft",
3232
"add_args": ["--data-transform", "azure-pipelines"],
33-
"files": r"^(\.)?azure-pipelines.(yml|yaml)$",
33+
"files": r"^(\.)?azure-pipelines\.(yml|yaml)$",
3434
"types": "yaml",
3535
},
3636
},
@@ -72,7 +72,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
7272
"url": "https://json.schemastore.org/dependabot-2.0.json",
7373
"hook_config": {
7474
"name": "Validate Dependabot Config (v2)",
75-
"files": r"^\.github/dependabot.(yml|yaml)$",
75+
"files": r"^\.github/dependabot\.(yml|yaml)$",
7676
"types": "yaml",
7777
},
7878
},
@@ -88,7 +88,10 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
8888
"url": "https://json.schemastore.org/github-action",
8989
"hook_config": {
9090
"name": "Validate GitHub Actions",
91-
"files": ["action.(yml|yaml)", r"\.github/actions/(.+/)?action.(yml|yaml)"],
91+
"files": [
92+
r"action\.(yml|yaml)",
93+
r"\.github/actions/(.+/)?action\.(yml|yaml)",
94+
],
9295
"types": "yaml",
9396
},
9497
},
@@ -106,7 +109,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
106109
"hook_config": {
107110
"name": "Validate GitLab CI config",
108111
"add_args": ["--data-transform", "gitlab-ci"],
109-
"files": r"^.*\.gitlab-ci.yml$",
112+
"files": r"^.*\.gitlab-ci\.yml$",
110113
"types": "yaml",
111114
},
112115
},
@@ -121,7 +124,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
121124
"name": "Validate ReadTheDocs Config",
122125
"description": "Validate ReadTheDocs config against the schema "
123126
"provided by ReadTheDocs",
124-
"files": r"^\.readthedocs.(yml|yaml)$",
127+
"files": r"^\.readthedocs\.(yml|yaml)$",
125128
"types": "yaml",
126129
},
127130
},
@@ -142,7 +145,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
142145
"url": "https://json.schemastore.org/travis",
143146
"hook_config": {
144147
"name": "Validate Travis Config",
145-
"files": r"^\.travis.(yml|yaml)$",
148+
"files": r"^\.travis\.(yml|yaml)$",
146149
"types": "yaml",
147150
},
148151
},

0 commit comments

Comments
 (0)