Skip to content
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

property.getValueAs() must not be null #1485

Closed
bhoflack opened this issue Jun 2, 2022 · 0 comments · Fixed by #1486
Closed

property.getValueAs() must not be null #1485

bhoflack opened this issue Jun 2, 2022 · 0 comments · Fixed by #1486

Comments

@bhoflack
Copy link
Contributor

bhoflack commented Jun 2, 2022

Expected Behavior

Observed Behavior

brh@MBP-van-Brecht aggregator % ktlint /Users/brh/Documents/work/aggregator/src/main/kotlin/com/melexis/aggregator/tasks/Reduce.kt /Users/brh/Documents/work/aggregator/src/main/kotlin/com/melexis/aggregator/tasks/Reduce.kt:1:1: Internal Error (parameter-list-wrapping). Please create a ticket at https://github.com/pinterest/ktlint/issues (if possible, please re-run with the --debug flag to get the stacktrace and provide the source code that triggered an error) (cannot be auto-corrected) () brh@MBP-van-Brecht aggregator % ktlint /Users/brh/Documents/work/aggregator/src/main/kotlin/com/melexis/aggregator/tasks/Reduce.kt --debug 10:48:47.499 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "baseline" id. 10:48:47.500 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "checkstyle" id. 10:48:47.500 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "json" id. 10:48:47.500 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "html" id. 10:48:47.500 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "plain" id. 10:48:47.500 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Discovered reporter with "sarif" id. 10:48:47.501 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - Initializing "plain" reporter with {verbose=false, color=false, color_name=DARK_GRAY} [DEBUG] Rule with id 'standard:max-line-length' should run after the rule with id 'experimental:trailing-comma'. However, the latter rule is not loaded and is allowed to be ignored. For best results, it is advised load the rule. [DEBUG] Rules will be executed in order below (unless disabled): - standard:filename, - standard:final-newline, - standard:wrapping, - standard:chain-wrapping, - standard:colon-spacing, - standard:comma-spacing, - standard:comment-spacing, - standard:curly-spacing, - standard:dot-spacing, - standard:import-ordering, - standard:keyword-spacing, - standard:modifier-order, - standard:no-blank-line-before-rbrace, - standard:no-consecutive-blank-lines, - standard:no-empty-class-body, - standard:no-line-break-after-else, - standard:no-line-break-before-assignment, - standard:no-multi-spaces, - standard:no-semi, - standard:no-trailing-spaces, - standard:no-unit-return, - standard:no-unused-imports, - standard:no-wildcard-imports, - standard:op-spacing, - standard:parameter-list-wrapping, - standard:paren-spacing, - standard:range-spacing, - standard:string-template, - standard:indent, - standard:max-line-length 10:48:48.118 [pool-1-thread-1] DEBUG com.pinterest.ktlint.KtlintCommandLine - Internal Error (parameter-list-wrapping) com.pinterest.ktlint.core.RuleExecutionException: java.lang.NullPointerException: property.getValueAs() must not be null at com.pinterest.ktlint.core.KtLint$lint$1.invoke(KtLint.kt:234) at com.pinterest.ktlint.core.KtLint$lint$1.invoke(KtLint.kt:214) at com.pinterest.ktlint.core.VisitorProvider$concurrentVisitor$1$1.invoke(VisitorProvider.kt:81) at com.pinterest.ktlint.core.VisitorProvider$concurrentVisitor$1$1.invoke(VisitorProvider.kt:75) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:236) at com.pinterest.ktlint.core.VisitorProvider$concurrentVisitor$1.invoke(VisitorProvider.kt:75) at com.pinterest.ktlint.core.VisitorProvider$concurrentVisitor$1.invoke(VisitorProvider.kt:74) at com.pinterest.ktlint.core.KtLint.lint(KtLint.kt:214) at com.pinterest.ktlint.internal.FileUtilsKt.lintFile(FileUtils.kt:178) at com.pinterest.ktlint.KtlintCommandLine.process(Main.kt:440) at com.pinterest.ktlint.KtlintCommandLine.access$process(Main.kt:97) at com.pinterest.ktlint.KtlintCommandLine$lintFiles$3.invoke$lambda-1(Main.kt:324) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.NullPointerException: property.getValueAs() must not be null at com.pinterest.ktlint.core.api.DefaultEditorConfigProperties$indentSizeProperty$1.invoke(UsesEditorConfigProperties.kt:173) at com.pinterest.ktlint.core.api.DefaultEditorConfigProperties$indentSizeProperty$1.invoke(UsesEditorConfigProperties.kt:169) at com.pinterest.ktlint.core.api.UsesEditorConfigProperties$DefaultImpls.getEditorConfigValue(UsesEditorConfigProperties.kt:62) at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.getEditorConfigValue(ParameterListWrappingRule.kt:39) at com.pinterest.ktlint.core.api.UsesEditorConfigProperties$DefaultImpls.getEditorConfigValue(UsesEditorConfigProperties.kt:44) at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.getEditorConfigValue(ParameterListWrappingRule.kt:39) at com.pinterest.ktlint.ruleset.standard.ParameterListWrappingRule.visit(ParameterListWrappingRule.kt:61) at com.pinterest.ktlint.core.KtLint$lint$1.invoke(KtLint.kt:221) ... 15 common frames omitted /Users/brh/Documents/work/aggregator/src/main/kotlin/com/melexis/aggregator/tasks/Reduce.kt:1:1: Internal Error (parameter-list-wrapping). Please create a ticket at https://github.com/pinterest/ktlint/issues (if possible, please re-run with the --debug flag to get the stacktrace and provide the source code that triggered an error) (cannot be auto-corrected) () 10:48:48.119 [main] DEBUG com.pinterest.ktlint.KtlintCommandLine - 803ms / 1 file(s) / 1 error(s)

Steps to Reproduce

ktlint /Users/brh/Documents/work/aggregator/src/main/kotlin/com/melexis/aggregator/tasks/Reduce.kt --debug

Your Environment

  • Version of ktlint used: 0.45.2
  • Relevant parts of the .editorconfig settings
  • Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): command line
  • Version of Gradle used (if applicable):
  • Operating System and version: Mac OS 12.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant