diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 00000000..fa7b621a --- /dev/null +++ b/.swiftlint.yml @@ -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 diff --git a/tests/test_swift.py b/tests/test_swift.py index 59d7d867..0682c149 100644 --- a/tests/test_swift.py +++ b/tests/test_swift.py @@ -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():