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

Add file post-processing to Kotlin generators #1400

Merged
merged 2 commits into from Nov 8, 2018

Conversation

Projects
None yet
3 participants
@wing328
Member

wing328 commented Nov 8, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

  • Add file post-processing to Kotlin generators (e.g. export KOTLIN_POST_PROCESS_FILE="/usr/local/bin/ktlint -F" with --enable-post-process-file using CLI)

3ca2aa8#diff-ed802784b178ca4a654ed7828c5eb0b8 shows the auto-format code done by ktlint

cc @jimschubert (2017/09) @dr4ke616 (2018/08)

@guenhter

This comment has been minimized.

Contributor

guenhter commented Nov 8, 2018

This is cool.
Should klint run then in the CI as well?

@wing328

This comment has been minimized.

Member

wing328 commented Nov 8, 2018

@guenhter very good question. At the moment, we don't do that because not all contributors (new or existing) have ktlint or other formatting tools (same version and setting) setup so we won't do it in our CIs at the moment.

@guenhter

This comment has been minimized.

Contributor

guenhter commented Nov 8, 2018

Ok, but this PR is then already great because we have the possibility to add klint.

@dr4ke616

This comment has been minimized.

Contributor

dr4ke616 commented Nov 8, 2018

This is very useful indeed 👍

@wing328

This comment has been minimized.

Member

wing328 commented Nov 8, 2018

Thanks for reviewing. Merged it to master.

There's a minor issue with 2 files in the Kotlin cllient due to wildcard import: #1401

If anyone has time, please help fix it with a PR. Thanks.

@wing328 wing328 merged commit 3969afb into master Nov 8, 2018

6 checks passed

Shippable Run 3989 status is SUCCESS.
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@wing328 wing328 deleted the kotlin_post_process branch Nov 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment