Skip to main content

Kotlin Style Check


This open-source python package automatically fixes your Kotlin code to follow coding conventions listed here:

https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rules

https://kotlinlang.org/docs/reference/coding-conventions.html#documentation-comments


Installation

https://pypi.org/project/kotlin-style-check/

pip install kotlin_style_check


RECOMMENDED: Usage from command line:

Searches for all .kt files in given path and fixes naming and comments errors

python -m kotlin_style_check --input_path


Usage as library (generally not recommended for casual users, but you can try):

Example

from kotlin_style_check import KotlinStyleChecker

print(KotlinStyleChecker().fix(["val My_Var = 5;"], ["out.log"])) # outputs "val myVar = 5;", logs changes to "out.log"

Short description of class KotlinStyleChecker

def fix_in_files(self, input_path) # input_path - path to dir or file to fix code style. logs data relatively to this path

def run_tests(self, log_file) # runs small checks

def setup_logger(self, log_file, level=logging.INFO) # needed to log data when calling lower level functions of this class (check_comments for example), overwrites it's global logger

""" ... other stuff you can find in source code """

Release files for kotlin-style-check 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kotlin-style-check 1.0
File Size Uploaded
kotlin_style_check-1.0.tar.gz 8.6 kB Details

Release files / kotlin_style_check-1.0.tar.gz

Download URL kotlin_style_check-1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0239631fbe01fde29407d4c4d2caef48fb21815374f7c075a22b9de0e5fc2d74
BLAKE2b-256 checksum
How to use checksums
2fbbed52bf1888498cd2067fadc712a0c5ec853aaea89d130fa65b65c1871a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.4

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

0.99

1 release file

0.95

1 release file

0.94

1 release file

0.93

1 release file

0.92

1 release file

0.91

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page