forked from pinterest/ktlint
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from pinterest:master #106
Open
pull
wants to merge
1,233
commits into
pdibenedetto:master
Choose a base branch
from
pinterest:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
If an operation reference contains an identifier, then it is used in a DSL notation in which the identifier should be separated with a from a parenthesized expression to avoid confusion with a function call. E.g. format as `every { foo() } returns (bar) andThen (baz)` Offsets for operators having length 2 or more, and not followed by single space were incorrect as length of the operator was not taken into account. Closes #2459
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
… to v0.15.2 (#2485) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Wrapping a binary expression takes precedence on wrapping value argument list - Remove dependency from `binary-expression-wrapping` on `value-argument-wrapping` rules - If a binary expression is used as value argument, and it causes the max line length to be exceeded, then wrap the value argument. - If the left hand side of the binary expression is call expression with a lambda argument, then wrapping the lambda argument has priority over wrapping the other arguments of the call expression. - If the binary expression contains an elvis operator, and does not fit on a single line, than the expression is wrapped before the elvis operator. Closes #2460
For settings which are tied to a specific rule, it is more clear to have the setting documented at the same place as the rule. Other generic settings are kept at the configuration page.
…d by a newline Closes #2492
Do not wrap binary expression value argument if it is already preceded by a newline
Fix operator spacing
Prepare 1.1.1 release
Updated refs to latest (1.1.1) release
Finish 1.1.1 release
…le-2.x fix(deps): update dependency org.slf4j:slf4j-simple to v2.0.11
…s.foojay-resolver-convention-0.x chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.8.0
…in-logging-jvm-6.x fix(deps): update dependency io.github.oshai:kotlin-logging-jvm to v6
….2 (#2826) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…2828) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…n to v2.1.0-beta2 (#2834) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This fixes the wrapping of the expression for code style `intellij_idea` which does not set the `max_line_length` property by default. But it also fixes the wrapping in case the `max_line_length` property contains value `unset` for any of the code styles. Closes #2827
Enforce consistent usage of braces in when entries. In case a when statement contains at least one when entry which uses braces around the body of the entry, then all when entries should use braces. Braces are helpful for following reasons: - Bodies of the when-conditions are all aligned at same column position - Closing braces helps in separating the when-conditions This rule is not incorporated in the Kotlin Coding conventions, nor in the Android Kotlin Styleguide. It is based on similar behavior in enforcing consistent use of braces in if-else statements. As of that the rule is only enabled automatically for code style `ktlint_official`. It can be enabled explicitly for other code styles. Closes #2557
… to v0.17.2 (#2837) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ne' (#2838) When 'ij_kotlin_indent_before_arrow_on_new_line' is enabled, the arrow in a when-entry should be indented when it starts on a new line. * For 'intellij_idea' and 'android_studio' keep formatting same as the ugly but default IDEA formatting. Note that the closing curly brace is de-indented compared to arrow. For those code styles this property needs to be set to true to keep formatting compatible with default IDEA Formatting when using IDEA version 2024.2 or above. * For 'ktlint_official' code style apply a more consistent formatting by indenting the entire block body (including closing curly brace) relative to the indented arrow. Closes #2808
Fixes #1123 --------- Co-authored-by: Alex Decker <adecker@dropbox.com> Co-authored-by: Paul Dingemans <paul-dingemans@users.noreply.github.com>
…#2839) This property allows enum entry names to be restricted to: * `upper_cases`: an enum entry may only contain uppercases, and underscores, and digits, and dicritics on letters and strokes * `camel_cases`: an enum entry may only contain CamelCase values, including digits, and dicritics on letters and strokes) * `upper_or_camel_case`: allows both the `upper_cases` and `camel_cases` styles as defined in the Kotlin Coding Conventions Closes #2835
….3 (#2840) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix typo * Update release testing
Co-authored-by: Ktlint Release Workflow <ktlint@github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…n to v2.1.0-rc (#2853) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
… kotlin version 2.0.1 (#2857) As this exception was not caught in the rule, and also not in the RuleExecutionContext it terminated linting/formatting of files containing a WHEN_ENTRY with an exception. In the Ktlint CLI this exception was swallowed. In ktlint-intellij-plugin the exception was recorded and became visible to users. Closes #2856
Co-authored-by: Ktlint Release Workflow <ktlint@github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )