Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktlint from brew (i.e. latest ktlint) breaking macos CI #509

Closed
jayvdb opened this issue Jun 26, 2022 · 1 comment · Fixed by #539
Closed

ktlint from brew (i.e. latest ktlint) breaking macos CI #509

jayvdb opened this issue Jun 26, 2022 · 1 comment · Fixed by #539
Labels

Comments

@jayvdb
Copy link
Member

jayvdb commented Jun 26, 2022

Filed upstream issue about the change pinterest/ktlint#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 --stdin to bypass this rule.
  • drop brew on macos, and install v0.45.x instead, like on linux
jayvdb added a commit to jayvdb/py2many that referenced this issue Jul 1, 2022
@jayvdb
Copy link
Member Author

jayvdb commented Jul 2, 2022

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()],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant