We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92fabe5 commit 9624f1fCopy full SHA for 9624f1f
tools/lint-apps
@@ -4,6 +4,7 @@
4
#
5
# Adapted from mozilla-iam/iam to run in CI.
6
import os
7
+import re
8
from typing import Any
9
10
from auth0.authentication import GetToken # type: ignore
@@ -24,10 +25,15 @@ def apps_from_yml(filename) -> Any:
24
25
return yaml.load(handle)
26
27
28
+def no_trailing_spaces_for_urls(line: str) -> str:
29
+ """We'll fail pre-commit's yaml linting otherwise."""
30
+ return line.replace(" url: \n", " url:\n")
31
+
32
33
def apps_to_yml(apps: Any) -> None:
34
yaml = YAML(typ="rt")
35
with open(APPS_NEW_YML, "w") as handle:
- yaml.dump(apps, handle)
36
+ yaml.dump(apps, handle, transform=no_trailing_spaces_for_urls)
37
38
39
def apps_from_auth0():
0 commit comments