py2many
py2many copied to clipboard
ktlint from brew (i.e. latest ktlint) breaking macos CI
Filed upstream issue about the change https://github.com/pinterest/ktlint/pull/1117
Alternatives include
- improving the test runner to generate PascalCase filenames, but this means the check will still fail when any normal Python code filename is used by real users.
- A more complicated/confusing version of the first option would be to generate the PascalCase filenames inside py2many for Kotlin - no other transpilers do this, and the test runner would then need to figure out the name which py2many used.
- use
ktlint --stdinto bypass this rule. - drop
brewon macos, and install v0.45.x instead, like on linux
Once upstream has done a release, we can remove the .editorconfig and use
diff --git a/py2many/cli.py b/py2many/cli.py
index 5cc907b6..dbc07001 100755
--- a/py2many/cli.py
+++ b/py2many/cli.py
@@ -329,7 +329,7 @@ def kotlin_settings(args, env=os.environ):
KotlinTranspiler(),
".kt",
"Kotlin",
- ["ktlint", "-F"],
+ ["ktlint", "--disabled_rules=filename", "-F"],
rewriters=[KotlinBitOpRewriter()],
transformers=[infer_kotlin_types],
post_rewriters=[KotlinPrintRewriter()],