Skip to content

chore(QTDI-2895): [Refactoring] S6126 Text blocks#1233

Open
undx wants to merge 9 commits into
masterfrom
ouf/QTDI-2895-sonar-text-blocks
Open

chore(QTDI-2895): [Refactoring] S6126 Text blocks#1233
undx wants to merge 9 commits into
masterfrom
ouf/QTDI-2895-sonar-text-blocks

Conversation

@undx
Copy link
Copy Markdown
Member

@undx undx commented May 28, 2026

https://qlik-dev.atlassian.net/browse/QTDI-2895

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • [] this PR has been written with the help of GitHub Copilot or another generative AI tool

- used intellij inspection as it is...
@undx undx changed the title chore(QTDI-2895): S6126 Text blocks initial raw commit chore(QTDI-2895): [Refactoring] S6126 Text blocks May 28, 2026
@undx undx requested a review from Copilot May 28, 2026 17:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors multi-line string literals across the codebase to use Java text blocks (addressing Sonar rule S6126), primarily improving readability/maintainability of embedded snippets (Asciidoc/JSON/YAML/README content) and test expectations without intended behavioral changes.

Changes:

  • Replace string-concatenation multi-line literals with Java text blocks in production code and annotations.
  • Update affected unit tests to assert against text-block formatted expected outputs.
  • Convert various generated/readme/template string payloads (Asciidoc/JSON/YAML/properties/HTML) to text blocks.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
documentation/src/main/java/org/talend/runtime/documentation/StaticRedirector.java Convert embedded redirect HTML content to a text block.
component-tools/src/test/java/org/talend/sdk/component/tools/ComponentValidatorTest.java Update expected exception messages to text blocks.
component-tools/src/test/java/org/talend/sdk/component/tools/AsciidocDocumentationGeneratorTest.java Update expected generated Asciidoc outputs to text blocks.
component-tools/src/main/java/org/talend/sdk/component/tools/validator/InternationalizationValidator.java Convert the autofix log suffix message to a text block.
component-tools/src/main/java/org/talend/sdk/component/tools/AsciidocDocumentationGenerator.java Convert the generated Asciidoc table header prefix to a text block.
component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/schema/TaCoKitGuessSchemaTest.java Convert large logged stacktrace sample to a text block.
component-starter-server/src/test/java/org/talend/sdk/component/starter/server/service/facet/component/ComponentGeneratorConfigurationTest.java Convert generated Java source expectations to text blocks.
component-starter-server/src/test/java/org/talend/sdk/component/starter/server/front/ProjectResourceTest.java Convert README.adoc expectation to a text block.
component-starter-server/src/main/java/org/talend/sdk/component/starter/server/service/openapi/OpenAPIGenerator.java Convert generated Messages.properties content to a text block.
component-starter-server/src/main/java/org/talend/sdk/component/starter/server/service/facet/wadl/WADLFacet.java Convert facet README content to a text block.
component-starter-server/src/main/java/org/talend/sdk/component/starter/server/service/facet/travis/TravisFacet.java Convert generated .travis.yml and facet README strings to text blocks.
component-starter-server/src/main/java/org/talend/sdk/component/starter/server/service/facet/codenvy/CodenvyFacet.java Convert facet README content to a text block.
component-server-parent/component-server/src/test/java/org/talend/sdk/component/server/test/InitTestInfra.java Convert embedded documentation.adoc test content to a text block.
component-server-parent/component-server/src/test/java/org/talend/sdk/component/server/service/VirtualDependenciesServiceTemplatingTest.java Convert multi-line properties expectations to text blocks.
component-server-parent/component-server/src/test/java/org/talend/sdk/component/server/front/DocumentationResourceImplTest.java Convert large Asciidoc sample content and expectations to text blocks.
component-server-parent/component-server/src/test/java/org/talend/sdk/component/server/front/beam/BeamActionSerializationTest.java Convert expected JSON payload to a text block.
component-server-parent/component-server/src/test/java/org/talend/sdk/component/server/front/ActionResourceImplTest.java Convert expected JSON payload to a text block.
component-server-parent/component-server/src/main/java/org/talend/sdk/component/server/configuration/ComponentServerConfiguration.java Convert @Documentation annotation value to a text block.
component-server-parent/component-server-api/src/main/java/org/talend/sdk/component/server/api/BulkReadResource.java Convert OpenAPI @RequestBody description to a text block while preserving trailing spaces via \\s.
component-api/src/main/java/org/talend/sdk/component/api/service/schema/Schema.java Convert @Partial annotation value to a text block.
component-api/src/main/java/org/talend/sdk/component/api/service/asyncvalidation/AsyncValidation.java Convert @Documentation annotation value to a text block.
component-api/src/main/java/org/talend/sdk/component/api/configuration/ui/layout/GridLayout.java Convert @Documentation annotation value to a text block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

@undx
Copy link
Copy Markdown
Member Author

undx commented May 28, 2026

hey @copilot ,
please resolve all issues that you've raised and fixed by yourself!
Because, you're raising issues from code that you suggested to be compliant!
That's boring and really annoying!

Copy link
Copy Markdown

Copilot AI commented May 28, 2026

hey @copilot ,
please resolve all issues that you've raised and fixed by yourself!
Because, you're raising issues from code that you suggested to be compliant!
...

Addressed in 1583231.

@undx
Copy link
Copy Markdown
Member Author

undx commented May 28, 2026

hey @copilot , please resolve all issues that you've raised and fixed by yourself! Because, you're raising issues from code that you suggested to be compliant! That's boring and really annoying!

wanna see your changes... and new review :D

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@undx
Copy link
Copy Markdown
Member Author

undx commented May 28, 2026

hey @copilot ,
please resolve all issues that you've raised and fixed by yourself!
Because, you're raising issues from code that you suggested to be compliant!
...

Addressed in 1583231.

Salut, alors ça donne quoi @copilot ?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

@sonar-rnd
Copy link
Copy Markdown

sonar-rnd Bot commented May 29, 2026

Failed Quality Gate failed

  • 0.00% Coverage on New Code (is less than 80.00%)
  • 1 New Issues (is greater than 0)

Project ID: org.talend.sdk.component:component-runtime

View in SonarQube

@sonar-rnd
Copy link
Copy Markdown

sonar-rnd Bot commented May 29, 2026

Failed Quality Gate failed

  • 0.00% Coverage on New Code (is less than 80.00%)
  • 1 New Issues (is greater than 0)

Project ID: org.talend.sdk.component:component-runtime

View in SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants