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

KotlinParseException on string concatenation #1181

Closed
Cheshiriks opened this issue Jan 21, 2022 · 2 comments · Fixed by #1183
Closed

KotlinParseException on string concatenation #1181

Cheshiriks opened this issue Jan 21, 2022 · 2 comments · Fixed by #1183
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Cheshiriks
Copy link
Member

Cheshiriks commented Jan 21, 2022

Diktate falls in fix plugin on string concatenation: "data:image/png;base64, " + state.image?.base64"

[ERROR] 2022-01-21 17:53:17 Internal error has occurred in rule [string-concatenation]. Please make an issue on this bug at https://github.com/cqfn/diKTat/. 
                       As a workaround you can disable these inspections in yml config: <[STRING_CONCATENATION]>.
                       Root cause of the problem is in [C:\Users\vwx1020336\IdeaProjects\save-cloud-frontend\save-frontend\src\main\kotlin\org\cqfn\save\frontend\components\views\OwnerView.kt] file.
org.cqfn.diktat.ruleset.utils.KotlinParseException: Text is not valid: [""data:image/png;base64, " + state.image?.base64"]
	at org.cqfn.diktat.ruleset.utils.KotlinParser.createNode(KotlinParser.kt:75) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.utils.KotlinParser.createNode$default(KotlinParser.kt:75) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule.fixBinaryExpressionWithConcatenation(StringConcatenationRule.kt:115) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule.access$fixBinaryExpressionWithConcatenation(StringConcatenationRule.kt:31) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule$detectStringConcatenation$1.invoke(StringConcatenationRule.kt:65) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule$detectStringConcatenation$1.invoke(StringConcatenationRule.kt:61) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.constants.Warnings.warnAndFix(Warnings.kt:261) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.constants.Warnings.warnAndFix$default(Warnings.kt:203) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule.detectStringConcatenation(StringConcatenationRule.kt:61) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule.logic(StringConcatenationRule.kt:44) ~[diktat-rules-1.0.1.jar:?]
	at org.cqfn.diktat.ruleset.rules.DiktatRule.visit(DiktatRule.kt:50) ~[diktat-rules-1.0.1.jar:?]
@Cheshiriks Cheshiriks added the bug Something isn't working label Jan 21, 2022
@orchestr7
Copy link
Member

Investigate and fix. We will take it into 1.0.3

@orchestr7 orchestr7 added this to the 1.0.3 milestone Jan 24, 2022
@orchestr7
Copy link
Member

orchestr7 commented Jan 24, 2022

Issue happens on FIX only, not so critical, but anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants