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

--code-style argument will cause error #48

Closed
darwin67 opened this issue Feb 29, 2024 · 5 comments
Closed

--code-style argument will cause error #48

darwin67 opened this issue Feb 29, 2024 · 5 comments

Comments

@darwin67
Copy link

Summary

1.2.0 got released today, and CI is failing for us using latest.

ktlint version: ktlint version 1.2.0
Parameter '--code-style' is no longer valid. The code style should be defined as '.editorconfig' property 'ktlint_code_style='
reviewdog: parse error: EOF

Seems like this has been deprecated for a while now, so perhaps time to remove it?

Expected behavior

CI runs

Current behavior

ktlint will return an error without executing.

@darwin67 darwin67 changed the title code_style argument will cause error --code-style argument will cause error Feb 29, 2024
@cp-megh-l
Copy link

+1

1 similar comment
@ffuf-libre
Copy link

+1

@guil-camp-scacap
Copy link
Contributor

guil-camp-scacap commented Feb 29, 2024

Until it is fixed, a workaround to get builds working again is to explicitly set the ktlint version to a previous one (i.e. 1.1.1)

  with:
        ...
        ktlint_version: 1.1.1
        ...

@ghaiszaher
Copy link
Member

Thanks for reporting. The action should not be using --code-style for versions after 1.0.0. However, in the new ktlint version, the command ktlint --version doesn't simply return the version 1.2.0 but rather ktlint version 1.2.0 for some reason. So the comparison is now failing.

Our goal in the entrypoint script was to make it work with any ktlint version so we have a logic of comparing versions and passing different values for android support.

Should be fixed with #50

ghaiszaher added a commit that referenced this issue Feb 29, 2024
Co-authored-by: Ghais Zaher <ghaiszaher@gmail.com>
@ghaiszaher
Copy link
Member

Fixed with #51

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

Successfully merging a pull request may close this issue.

5 participants