diff options
| author | Ellis KenyĆ <elken@users.noreply.github.com> | 2022-05-13 17:23:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-13 09:23:57 -0700 |
| commit | 363d634c5c3d79983fb44d2238fcfdf24fbf81b2 (patch) | |
| tree | 5db5c28f0a5ec1154157f66067a93b52faedf5aa /test | |
| parent | b5dbab53eadf64529a0bfe217c7750f1d7d85fce (diff) | |
Add ktlint (#97)
* feat: add ktlint
* Apply suggestions from code review
Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/formatters/installers/ktlint.bash | 4 | ||||
| -rw-r--r-- | test/formatters/samplecode/ktlint/in.kt | 8 | ||||
| -rw-r--r-- | test/formatters/samplecode/ktlint/out.kt | 5 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/formatters/installers/ktlint.bash b/test/formatters/installers/ktlint.bash new file mode 100644 index 0000000..347a816 --- /dev/null +++ b/test/formatters/installers/ktlint.bash @@ -0,0 +1,4 @@ +ver="$(latest_release pinterest/ktlint)" +apt-get install -y default-jre +wget "https://github.com/pinterest/ktlint/releases/download/${ver}/ktlint" -O /usr/local/bin/ktlint +chmod +x /usr/local/bin/ktlint diff --git a/test/formatters/samplecode/ktlint/in.kt b/test/formatters/samplecode/ktlint/in.kt new file mode 100644 index 0000000..deacc25 --- /dev/null +++ b/test/formatters/samplecode/ktlint/in.kt @@ -0,0 +1,8 @@ +class Test + +{ +fun test( v: String ) +{ + println(v) +} +} diff --git a/test/formatters/samplecode/ktlint/out.kt b/test/formatters/samplecode/ktlint/out.kt new file mode 100644 index 0000000..c1838fb --- /dev/null +++ b/test/formatters/samplecode/ktlint/out.kt @@ -0,0 +1,5 @@ +class Test { + fun test(v: String) { + println(v) + } +} |
