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

Recognize Kotlin Script when linting and formatting code from stdin #1865

Merged
merged 3 commits into from
Mar 18, 2023

Conversation

paul-dingemans
Copy link
Collaborator

Description

Recognize Kotlin Script when linting and formatting code from stdin with KtLint CLI.

First the code is processed as normal Kotlin code. If this results in a Parse Exception then the same code is scanned once more as Kotlin Script.

Closes #1832

Checklist

  • PR description added
  • tests are added
  • KtLint has been applied on source code itself and violations are fixed
  • documentation is updated
  • CHANGELOG.md is updated

In case of adding a new rule:

@paul-dingemans paul-dingemans merged commit f0229c4 into master Mar 18, 2023
@paul-dingemans paul-dingemans deleted the 1832-stdin-kotlin-script branch March 18, 2023 13:16
@paul-dingemans paul-dingemans added this to the 0.49.0 milestone Mar 21, 2023
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 this pull request may close these issues.

Gradle kts files are rejected over standard in
1 participant