Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinterest/ktlint
An anti-bikeshedding Kotlin linter with built-in formatter
https://github.com/pinterest/ktlint
kotlin lint linter
Last synced: 5 days ago
JSON representation
An anti-bikeshedding Kotlin linter with built-in formatter
- Host: GitHub
- URL: https://github.com/pinterest/ktlint
- Owner: pinterest
- License: mit
- Created: 2016-07-27T09:03:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T04:11:53.000Z (2 months ago)
- Last Synced: 2024-10-29T11:18:56.036Z (2 months ago)
- Topics: kotlin, lint, linter
- Language: Kotlin
- Homepage: https://pinterest.github.io/ktlint/
- Size: 16.4 MB
- Stars: 6,223
- Watchers: 57
- Forks: 512
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-kotlin - ktlint - An anti-bikeshedding Kotlin linter with built-in formatter (Libraries)
- awesome-ccamel - pinterest/ktlint - An anti-bikeshedding Kotlin linter with built-in formatter (Kotlin)
- awesome-list - ktlint - bikeshedding Kotlin linter with built-in formatter | pinterest | 4390 | (Kotlin)
- awesome-linters - ktlint - An anti-bikeshedding Kotlin (Linters / Kotlin)
README
Kotlin linter in spirit of standard/standard (JavaScript) and gofmt (Go).## Key features
- No configuration required
- Built-in Rule sets
- Built-in formatter
- `.editorconfig` support
- Several built-in reporters: `plain`, `json`, `html` and `checkstyle`
- Executable jar
- Allows extension with custom rule sets and reporters## Quick start
Follow steps below for a quick start with latest ktlint release.
* Step 1: Install with brew
```shell
brew install ktlint
```
See [download and verification from GitHub](https://pinterest.github.io/ktlint/latest/install/cli/#download-and-verification) or [other package managers](https://pinterest.github.io/ktlint/latest/install/cli/#package-managers) for alternative ways of installing ktlint. Or, use one of the [integrations like maven and gradle plugins](https://pinterest.github.io/ktlint/latest/install/integrations/).* Step 2: Lint and format your code
All files with extension `.kt` and `.kts` in the current directory and below will be scanned. Problems will be fixed automatically when possible.
```shell title="Autocorrect style violations"
ktlint --format
# or
ktlint -F
```
See [cli usage](https://pinterest.github.io/ktlint/latest/install/cli/#command-line-usage) for a more extensive description on using ktlint.## Documentation
### Legal
This project is not affiliated with nor endorsed by JetBrains.
All code, unless specified otherwise, is licensed under the [MIT](https://opensource.org/licenses/MIT) license.
Copyright (c) 2019 Pinterest, Inc.
Copyright (c) 2016-2019 Stanley Shyiko.