Releases: pinterest/ktlint
Releases · pinterest/ktlint
0.37.1
0.37.0
Thank you to Tapchicoma and romtsn for all their hard work on this release!
Added
- Gradle wrapper validation (#684)
- Experimental
SpacingAroundDoubleColonrule (#722) - Experimental
SpacingBetweenDeclarationsWithCommentsRuleandSpacingBetweenDeclarationsWithAnnotationsRule. Fixes (#721) kotlin_imports_layoutconfig for.editorconfigfile so that import ordering is configurable. Fixes (#527)
Changed
- Kotlin was updated to 1.3.70 version
- Loading properties from
.editorconfigwas fully delegated to ec4j library. This fixes ability to override
properties for specific files/directories (#742) - Promote experimental "indent" rule to standard one, old standard "indent" rule is removed
- Functions to calculate line/column are now public so they can be used by 3rd party tools (#725)
AnnotationRulenow handles file annotations as well (#714)
Fixed
- Ignore keywords in KDoc comments (#671)
- Allow multiple spaces in KDoc comments (#706)
- Trailing comment no longer reported as incorrect indentation (#710)
- Annotated function types no longer reported as an error (#737)
FinalNewlineRuleno longer reports error for empty files (#723)- EOL comments will no longer cause
AnnotationRuleto report an error (#736) - Formatter will no longer break class declaration with trailing comment (#728)
- Formatting for single line if/else statements (#174)
- Exception in
NoLineBreakBeforeAssignmentRule(#693)
Removed
- Removed Maven; builds all run under Gradle (#445)
- Old standard
IndentRule
0.36.0
Added
- HTML reporter (#641)
- Experimental rule to lint enum entry names (#638)
@Suppress("RemoveCurlyBracesFromTemplate")now respected (#263)
Upgraded
Fixed
.gitdirectory now discovered instead of hardcoded (#623)- Several bugs with the experimental annotation rule (#628) (#642) (#654) (#624)
- Allow newline after lambda return type (#643)
- Allow empty first line in a function that returns an anonymous object (#655)
- Indentation with lambda argument (#627)
- ktlint can now lint UTF-8 files with BOM (#630
- Indentation with newline before return type (#663)
- Build/tests on Windows (#640)
- Allow whitespace after
(followed by a comment (#664)
0.35.0
Added
- Support for specifying color for output via
--color-namecommand line flag. (#585) - Support for custom rulesets and providers on Java 9+ (#573)
Deprecated
--apply-to-ideaflag; useapplyToIDEAsubcommand instead (#554)--apply-to-idea-projectflag; useapplyToIDEAProjectsubcommand instead (#593)0.0.0-SNAPSHOTbuilds; snapshot builds are now versioned, e.g. 0.35.0-SNAPSHOT (#588)- Note: When using the new snapshot builds, you may need to add an explicit dependency on
kotlin-compiler-embeddableto your ruleset project.
- Note: When using the new snapshot builds, you may need to add an explicit dependency on
Removed
- Support for loading 3rd party rulesets via Maven (#566)
Upgraded
Fixed
- Bugs with spacing in experimental
AnnotationRule(#552) (#601 - Brackets would be removed from empty companion object (#600)
- Bugs with experimental
IndentationRule(#597) (#599) - Erroneous space between
}and](#596) - Spacing around multiplication sign in lambdas (#598)
--versionoutput with gradle-built JAR (#613)
0.34.2
Minor bugfix release for 0.34.0. (Note: 0.34.1 deprecated/deleted due to regression in disabled_flags .editorconfig support.)
Added
- Support for globally disabling rules via
--disabled_rulescommand line flag. (#534)
Fixed
0.34.0
Added
- Support for Kotlin 1.3.41
- Support for globally disabling rules via custom
disabled_rulesproperty in.editorconfig(#503) experimental:no-empty-first-line-in-method-block(#474)- Unit tests for ruleset providers
Upgraded
- AssertJ from 3.9.0 to 3.12.2 (#520)
Enabled
- Final newline by default (#446)
no-wildcard-import(Re-enabled after temporarily disabling in 0.33.0)experimental:annotation(#509)experimental:multiline-if-else(no autocorrection)experimental:package-name(currently only disallows underscores in package names)
Deprecated
MavenDependencyResolver. Scheduled to be removed in 0.35.0 ([#468])(#468)--install-git-pre-commit-hookflag; useinstallGitPreCommitHooksubcommand instead (#487)--print-astflag; useprintASTsubcommand instead (#500)
Removed
- Support for
--ruleset-repositoryand--ruleset-updateflags
Fixed
0.33.0
Added
- Support for Kotlin 1.3.31
Disabled
- No wildcard imports rule (#48). Developers wishing to still enforce this rule should add the code into a custom ruleset.
Fixed
0.32.0
Note: This release will not be updated in the homebrew-ktlint tap; we will be opening a PR to make ktlint part of the core Homebrew formulae.
Added
experimental/import-orderingrule (#189).
Usektlint --experimentalto enabled.- Support for Kotlin 1.3.30
- Build now compatible with jitpack
Fixed
- Incorrectly flagging a missing newline for functions with no parameters (#327).
- Semicolons now allowed in KDocs (#362).
- Spaces now disallowed after
super(#369). - Annotations in function parameters now checked for indentation (#374]
Changed
- Code now lives in
com.pinterestpackage - groupId now
com.pinterest - Custom ruleset
META-INF.servicesfile must be renamed tocom.pinterest.ktlint.core.RuleSetProvider
0.31.0-SNAPSHOT
Snapshot release which includes Kotlin 1.3.30 support.
0.31.0
Added
Fixed
- Spacing check around
<&>operators.
Changed
no-multi-spacesrule (horizontal alignment of comments is no longer allowed) (#269).colon-spacingrule (:must not appear at the beginning of the line).package-namerule (disabled until #208 is resolved).--print-astto output com.github.shyiko.ktlint.core.ast.ElementType.* asnode.elementType, e.g.
$ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin
1: ~.psi.KtFile (FILE)
1: ~.psi.KtPackageDirective (PACKAGE_DIRECTIVE) ""
1: ~.psi.KtImportList (IMPORT_LIST) ""
1: ~.psi.KtScript (SCRIPT)
1: ~.psi.KtBlockExpression (BLOCK)
1: ~.psi.KtNamedFunction (FUN)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (FUN_KEYWORD) "fun"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1: ~.c.i.p.impl.source.tree.LeafPsiElement (IDENTIFIER) "f"
1: ~.psi.KtParameterList (VALUE_PARAMETER_LIST)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (LPAR) "("
1: ~.c.i.p.impl.source.tree.LeafPsiElement (RPAR) ")"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1: ~.psi.KtBlockExpression (BLOCK)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (LBRACE) "{"
1: ~.c.i.p.impl.source.tree.LeafPsiElement (RBRACE) "}"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) "\n"
format: <line_number:> <node.psi::class> (<node.elementType>) "<node.text>"
legend: ~ = org.jetbrains.kotlin, c.i.p = com.intellij.psi
kotlin-compilerversion to 1.3.21 (from 1.3.20).
Removed
- Dependency on JCenter (#349).