Skip to content

Address PR #905 review comments: third batch

899e42c
Select commit
Loading
Failed to load commit list.
Open

Collaborative Script Editing #905

Address PR #905 review comments: third batch
899e42c
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 5, 2026 in 1m 11s

Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)
E Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 376 in server/test/utils/script/test_line_to_ydoc.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unused local variable "text2".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxNTFyB23KZ6pmyqfc8&open=AZxNTFyB23KZ6pmyqfc8&pullRequest=905

Check warning on line 568 in server/utils/script_room_manager.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kSQLxeDRd2iZWBE&open=AZx26kSQLxeDRd2iZWBE&pullRequest=905

Check warning on line 946 in server/test/utils/script/test_ydoc_to_lines.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the unused local variable "last_p2" with "_".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kQtLxeDRd2iZWBB&open=AZx26kQtLxeDRd2iZWBB&pullRequest=905

Check warning on line 247 in server/utils/script_room_manager.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kSQLxeDRd2iZWBC&open=AZx26kSQLxeDRd2iZWBC&pullRequest=905

Check warning on line 256 in client/src/store/modules/scriptDraft.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected an assignment or function call and instead saw an expression.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kUbLxeDRd2iZWBL&open=AZx26kUbLxeDRd2iZWBL&pullRequest=905

Check warning on line 210 in server/utils/script_room_manager.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxOLpTIpkDsV6zP8JM3&open=AZxOLpTIpkDsV6zP8JM3&pullRequest=905

Check warning on line 37 in server/alembic_config/versions/d3e9f0c1a2b4_add_script_revision_fk_constraints.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a union type expression for this type hint.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZySd0-Ush1l-QulTQUI&open=AZySd0-Ush1l-QulTQUI&pullRequest=905

Check warning on line 34 in client/src/utils/yjs/ScriptDocProvider.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#codePointAt()` over `String#charCodeAt()`.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxN_70T5P4Z-cTAjMQZ&open=AZxN_70T5P4Z-cTAjMQZ&pullRequest=905

Check warning on line 14 in server/alembic_config/versions/14f82e306537_.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Assign to "down_revision" a value of type "Union[str, NoneType]" instead of "tuple" or update its type hint.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx9wWw__Fp-Dy4pT6-j&open=AZx9wWw__Fp-Dy4pT6-j&pullRequest=905

Check warning on line 952 in server/test/controllers/test_ws_controller.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the unused local variable "uuid" with "_".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kMxLxeDRd2iZWA_&open=AZx26kMxLxeDRd2iZWA_&pullRequest=905

Check failure on line 1033 in server/test/controllers/test_ws_controller.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"password" detected here, review this potentially hard-coded credential.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZygCGC2Pqqod_PQSBNw&open=AZygCGC2Pqqod_PQSBNw&pullRequest=905

Check warning on line 374 in server/test/utils/script/test_script_room.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use asynchronous features in this function or remove the `async` keyword.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZy2cArTznXD25xJu3Mh&open=AZy2cArTznXD25xJu3Mh&pullRequest=905

Check warning on line 132 in client/src/utils/yjs/ScriptDocProvider.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to always return the same type.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZy5UeLmgJchwaML3iPh&open=AZy5UeLmgJchwaML3iPh&pullRequest=905

Check warning on line 19 in server/alembic_config/versions/888565843a87_add_script_draft_table.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a union type expression for this type hint.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxNTF2623KZ6pmyqfdB&open=AZxNTF2623KZ6pmyqfdB&pullRequest=905

Check failure on line 265 in server/utils/script_room_manager.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kSQLxeDRd2iZWBD&open=AZx26kSQLxeDRd2iZWBD&pullRequest=905

Check warning on line 701 in server/test/controllers/test_ws_controller.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the unused local variable "uuid" with "_".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxkFXLZEprB7dtbiuUk&open=AZxkFXLZEprB7dtbiuUk&pullRequest=905

Check warning on line 35 in server/alembic_config/versions/c2f8d4a6e0b3_repair_script_revision_linked_lists.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a union type expression for this type hint.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZySd1Bash1l-QulTQUM&open=AZySd1Bash1l-QulTQUM&pullRequest=905

Check warning on line 375 in server/test/utils/script/test_line_to_ydoc.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unused local variable "text1".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxNTFyB23KZ6pmyqfc9&open=AZxNTFyB23KZ6pmyqfc9&pullRequest=905

Check warning on line 71 in client/src/utils/yjs/ScriptDocProvider.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxN_70T5P4Z-cTAjMQb&open=AZxN_70T5P4Z-cTAjMQb&pullRequest=905

Check warning on line 260 in client/src/store/modules/scriptDraft.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected an assignment or function call and instead saw an expression.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZx26kUbLxeDRd2iZWBM&open=AZx26kUbLxeDRd2iZWBM&pullRequest=905

Check warning on line 268 in server/test/controllers/test_ws_controller.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the unused local variable "uuid" with "_".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxkFXLZEprB7dtbiuUd&open=AZxkFXLZEprB7dtbiuUd&pullRequest=905

Check warning on line 18 in server/alembic_config/versions/888565843a87_add_script_draft_table.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a union type expression for this type hint.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxNTF2623KZ6pmyqfdA&open=AZxNTF2623KZ6pmyqfdA&pullRequest=905

Check warning on line 169 in client/src/utils/yjs/ScriptDocProvider.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxN_70T5P4Z-cTAjMQc&open=AZxN_70T5P4Z-cTAjMQc&pullRequest=905

Check warning on line 1 in client/src/utils/yjs/ScriptDocProvider.test.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused import of 'beforeEach'.

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZyVG_HoUdqZEbbepSK5&open=AZyVG_HoUdqZEbbepSK5&pullRequest=905

Check warning on line 155 in server/test/controllers/test_ws_controller.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the unused local variable "uuid" with "_".

See more on https://sonarcloud.io/project/issues?id=dreamteamprod_DigiScript&issues=AZxkFXLZEprB7dtbiuUX&open=AZxkFXLZEprB7dtbiuUX&pullRequest=905