Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.
/ diktat-demo Public archive

Demo project to show how diKTat or KTlint rule-sets can fix style issues in your code.

Notifications You must be signed in to change notification settings

saveourtool/diktat-demo

Repository files navigation

❗Please note, that all DEMO projects are being migrated to SAVEOURTOOL.com, because heroku is not free anymore.

You can find demos with the following new links:

diktat ktlint

=============

KTlint/diKTat demo project

Run diKTat

This is simple demo for ktlint and diktat project (a number of codestyle rules for Kotlin powered by KTlint framework) This simple demo is written in Kotlin using Spring Boot, Thymeleaf and Kotlin/JS and shows how a style of your code can be checked with diKTat rule set.

Many thanks for this idea and some design of the site to YAPF demo project, we appreciate it, but we love Java more than Python (that's why Spring Boot is here instead of flask).

You can try diktat-demo online right now.

Usage

  1. Open demo at https://ktlint-demo.herokuapp.com or run it locally
  2. Write your Kotlin code snippets to the text block at the left.
  3. At the bottom choose the mode fix or check and one codestyle ktlint or diktat. In case you have chosen check mode you won't see any changes in the code.
  4. In case you would like to configure diktat - you can upload diktat configuration. Example can be found here
  5. Press submit and see warnings above and fixed file in the right text block.

How to start this demo app locally

The server will be started on http://localhost:8082/ main page is /demo - you will be redirected there from the host. To build and start the app simple do the following:

$ gradle bootRun

if you want to have a fat-jar and run it - use gradle command to build the app and then run it as jar file:

$ gradle build
$ java -jar build/libs/diktat-demo-0.0.1-SNAPSHOT.jar

About

Demo project to show how diKTat or KTlint rule-sets can fix style issues in your code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published