Skip to content

refactor(layout): streamline table row fitting logic and improve code…

b81c602
Select commit
Loading
Failed to load commit list.
Open

Refactor rendering backend to explicit capability composition #24

refactor(layout): streamline table row fitting logic and improve code…
b81c602
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Jun 9, 2026 in 2m 31s

Annotations

Check warning on line 89 in docraft/src/docraft/docraft_document_context.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this variable a reference-to-const. The current type of "rendering_service" is "class docraft::services::RenderingService &".

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6FGY3EbnpqgwExrmbz&open=AZ6FGY3EbnpqgwExrmbz&pullRequest=24

Check failure on line 282 in docraft/src/docraft/craft/parser/docraft_table_parser.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 31 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6euutLOMiYihiG4TKk&open=AZ6euutLOMiYihiG4TKk&pullRequest=24

Check warning on line 282 in docraft/src/docraft/templating/docraft_template_engine.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"catch" a specific exception type.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6T7QPdsIEvOGOzFdWZ&open=AZ6T7QPdsIEvOGOzFdWZ&pullRequest=24

Check warning on line 132 in docraft/src/docraft/layout/handler/docraft_layout_table_handler.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "w" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6uKazhx20R8avXAytY&open=AZ6uKazhx20R8avXAytY&pullRequest=24

Check warning on line 252 in docraft/src/docraft/templating/docraft_template_engine.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"catch" a specific exception type.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6T7QPdsIEvOGOzFdWX&open=AZ6T7QPdsIEvOGOzFdWX&pullRequest=24

Check warning on line 195 in docraft/src/docraft/layout/handler/docraft_layout_table_handler.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function should be declared "const".

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6uKazhx20R8avXAyta&open=AZ6uKazhx20R8avXAyta&pullRequest=24

Check warning on line 99 in docraft/src/docraft/renderer/painter/docraft_text_painter.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "text_backend" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6FGYvibnpqgwExrmbo&open=AZ6FGYvibnpqgwExrmbo&pullRequest=24

Check warning on line 509 in docraft/src/docraft/layout/docraft_layout_engine_impl.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "overflows_body" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYg5g8nnhzYhP2wWZ&open=AZ6UYg5g8nnhzYhP2wWZ&pullRequest=24

Check warning on line 572 in docraft/test/docraft/layout/docraft_pagination_stress_test.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce verbosity with "using enum" for "docraft::ColorName".

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6j-11-AQ80L8fB1eM_&open=AZ6j-11-AQ80L8fB1eM_&pullRequest=24

Check warning on line 189 in docraft/src/docraft/layout/handler/docraft_layout_table_handler.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "total" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6uKazhx20R8avXAytZ&open=AZ6uKazhx20R8avXAytZ&pullRequest=24

Check warning on line 432 in docraft/src/docraft/layout/docraft_layout_engine_impl.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function should be declared "const".

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYg5g8nnhzYhP2wWY&open=AZ6UYg5g8nnhzYhP2wWY&pullRequest=24

Check warning on line 227 in docraft/src/docraft/layout/docraft_layout_engine_impl.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "is_horizontal" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6euuxCOMiYihiG4TKr&open=AZ6euuxCOMiYihiG4TKr&pullRequest=24

Check warning on line 498 in docraft/test/docraft/layout/docraft_pagination_stress_test.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use std::format instead of concatenating pieces manually.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYgxm8nnhzYhP2wWO&open=AZ6UYgxm8nnhzYhP2wWO&pullRequest=24

Check warning on line 633 in docraft/src/docraft/model/docraft_table.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "const" qualifier from the return type in all declarations.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6j-2EeAQ80L8fB1eNL&open=AZ6j-2EeAQ80L8fB1eNL&pullRequest=24

Check warning on line 58 in docraft/src/docraft/utils/docraft_parser_utilis.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"catch" a specific exception type.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6T7QOesIEvOGOzFdWR&open=AZ6T7QOesIEvOGOzFdWR&pullRequest=24

Check warning on line 59 in docraft/include/docraft/management/docraft_dom_facade.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this #include directive to the top of the file.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYhAN8nnhzYhP2wWj&open=AZ6UYhAN8nnhzYhP2wWj&pullRequest=24

Check failure on line 38 in docraft/include/docraft/layout/docraft_layout_engine.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Customize this class' destructor to participate in resource management.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYg-n8nnhzYhP2wWa&open=AZ6UYg-n8nnhzYhP2wWa&pullRequest=24

Check warning on line 103 in docraft/src/docraft/layout/handler/docraft_layout_text_handler.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Capture variables by reference, it is safe in this context.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6FGY0hbnpqgwExrmbq&open=AZ6FGY0hbnpqgwExrmbq&pullRequest=24

Check warning on line 83 in docraft/src/docraft/layout/handler/docraft_layout_table_handler.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a reference-to-const. The current type of "cursor" is "class docraft::DocraftCursor &".

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6uKazhx20R8avXAytW&open=AZ6uKazhx20R8avXAytW&pullRequest=24

Check warning on line 185 in docraft/src/docraft/docraft_document.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "current_directory_candidate" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6TYueA0jwSx2zzUJGk&open=AZ6TYueA0jwSx2zzUJGk&pullRequest=24

Check warning on line 294 in docraft/src/docraft/docraft_document.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "page_backend" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ560iYD_mu6a-CMdY6V&open=AZ560iYD_mu6a-CMdY6V&pullRequest=24

Check failure on line 122 in docraft/src/docraft/layout/docraft_layout_engine_impl.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 46 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6UYg5g8nnhzYhP2wWS&open=AZ6UYg5g8nnhzYhP2wWS&pullRequest=24

Check warning on line 50 in docraft/src/docraft/utils/docraft_font_registry.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"catch" a specific exception type.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6T7QOrsIEvOGOzFdWS&open=AZ6T7QOrsIEvOGOzFdWS&pullRequest=24

Check failure on line 205 in docraft/src/docraft/renderer/painter/docraft_table_painter.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6j-2C3AQ80L8fB1eNJ&open=AZ6j-2C3AQ80L8fB1eNJ&pullRequest=24

Check failure on line 114 in docraft/src/docraft/renderer/painter/docraft_table_painter.cc

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=Cadons_Docraft&issues=AZ6j-2C3AQ80L8fB1eNI&open=AZ6j-2C3AQ80L8fB1eNI&pullRequest=24