-
Notifications
You must be signed in to change notification settings - Fork 512
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
try-catch comment causing red code on format #2427
Comments
The comment Ktlint definitely makes your code sample not compiling anymore. Will be fixed in next release. |
Yep, that's what I did. In the real case (see linked right above your comment) it was actually referring to one of the |
Squashed commit of the following: commit 2ec7cf497dc1a46ba2f6acc6e08542d106f57281 Author: John Rodriguez <jrod@squareup.com> Date: Tue Jan 9 15:47:28 2024 -0500 Apply suggested feedback commit 54d7dea41d9842e1481ebc0e14864b7016c407ee Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 12:38:29 2023 +0000 partial `gradlew spotlessApply` commit 6ee72c30511fa6dde5cbe47d932d73d73d364eea Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 13:06:19 2023 +0000 Move comment to relevant block to prevent pinterest/ktlint#2427 commit 12ee79b1cc6e2094cc576fe490a03b4994a65846 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 12:41:33 2023 +0000 > Task :paparazzi-gradle-plugin:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\test\projects\lifecycle-usages\src\test\java\app\cash\paparazzi\plugin\test\LifecycleUsageTest.kt': Error on line: 21, column: 13 rule: standard:function-naming Function name should start with a lowercase letter (except factory methods) and use camel case commit cb2baf39f369a12ca851f871197c4b65c1a1893e Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 15:18:37 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\interceptors\MatrixMatrixMultiplicationInterceptor.kt': Error on line: 38, column: 15 rule: standard:function-naming Function name should start with a lowercase letter (except factory methods) and use camel case commit b95e5ba475bfcee65827d9e5c337fe53faee5d13 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 13:07:39 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\test\java\app\cash\paparazzi\internal\resources\PseudolocaleGeneratorTest.kt': Error on line: 85, column: 1 rule: standard:max-line-length Exceeded max line length (140) commit 06c514f94bc0575c459939ca3cefef4be1ee6653 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:32:42 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\resources\Pseudolocalizer.kt': Error on line: 22, column: 1 rule: standard:no-consecutive-comments an EOL comment may not be preceded by a KDoc. Reversed order is allowed though when separated by a newline. commit edebb8a65c641499a5455fea95a3afd8fc10366b Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:23:48 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\interceptors\MatrixVectorMultiplicationInterceptor.kt': Error on line: 23, column: 2 rule: standard:max-line-length Exceeded max line length (140) commit 308931cfb70ce22523d1efd444d5863aaa7f4f01 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:11:42 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\resources\RepositoryLoader.kt': Error on line: 124, column: 15 rule: standard:property-naming Property name should start with a lowercase letter and use camel case commit f1eab7e9b97f1bb2a906a6c9683439ef282e254e Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:08:38 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\resources\Pseudolocalizer.kt': Error on line: 351, column: 15 rule: standard:property-naming Property name should start with a lowercase letter and use camel case commit cacd26ca7d5904467c74ddcb8f427e8c6cf95c4e Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:02:24 2023 +0000 > Task :paparazzi:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\internal\interceptors\MatrixMatrixMultiplicationInterceptor.kt': Error on line: 19, column: 11 rule: standard:property-naming Property name should start with a lowercase letter and use camel case commit 1272b12f2038105c4eb0c02bd7fbe278ce543e62 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:35:39 2023 +0000 > Task :sample:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\test\java\app\cash\paparazzi\sample\ComposeA11yTest.kt': Error on line: 56, column: 39 rule: standard:discouraged-comment-location A comment in a 'value_argument_list' is only allowed when placed on a separate line commit ef0b4d3a38450d66ee103a68fcb5bd49a83e5c2d Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:00:47 2023 +0000 > Task :sample:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\sample\ResourcesDemo.kt': Error on line: 27, column: 11 rule: standard:property-naming Property name should use the screaming snake case notation when the value can not be changed commit be7a21181f3bc6634005b3908a491a0567142dfc Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:04:34 2023 +0000 > Task :sample:spotlessKotlin FAILED Step 'ktlint' found problem in 'src\main\java\app\cash\paparazzi\sample\ResourcesDemo.kt': Error on line: 31, column: 5 rule: standard:function-naming Function name should start with a lowercase letter (except factory methods) and use camel case commit 91736c125f223dae1c7d0d25e1e14938a9e47ac6 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 12:55:26 2023 +0000 Help IDEA indent correctly when user has tabs enabled. commit 4d9b80514da232747e3069aad2744cf38f5059f2 Author: Róbert Papp (TWiStErRob) <papp.robert.s@gmail.com> Date: Sun Dec 10 11:16:29 2023 +0000 Sync up spotless.kotlin.ktlint config overrides with .editorconfig and use a single source of truth.
Expected Behavior
Unsure, but definitely still compiling.
Observed Behavior
Steps to Reproduce
ktlint --format f.kt
Your Environment
.editorconfig
settings: noneThe text was updated successfully, but these errors were encountered: