Lint generated swift files (if swiftlint is available)
This commit is contained in:
Родитель
b08357ffef
Коммит
f46c4915f8
|
@ -0,0 +1,6 @@
|
|||
identifier_name:
|
||||
# Turn off it complaining about `id` or `let t = title`, etc, but keep
|
||||
# warnings around e.g. enum names.
|
||||
min_length:
|
||||
warning: 0
|
||||
error: 0
|
|
@ -47,10 +47,10 @@ def test_parser(tmpdir):
|
|||
content = fd.read()
|
||||
assert 'category: ""' in content
|
||||
|
||||
# Only run this test if ktlint is on the path
|
||||
if shutil.which("ktlint"):
|
||||
# Only run this test if swiftlint is on the path
|
||||
if shutil.which("swiftlint"):
|
||||
for filepath in tmpdir.glob("*.swift"):
|
||||
subprocess.check_call(["ktlint", filepath])
|
||||
subprocess.check_call(["swiftlint", "lint", filepath])
|
||||
|
||||
|
||||
def test_swift_generator():
|
||||
|
|
Загрузка…
Ссылка в новой задаче