Skip to content

🧪 Add test files

3988f7e
Select commit
Loading
Failed to load commit list.
Merged

✨ Support skill features, including creation, preview, set in agent version #2731

🧪 Add test files
3988f7e
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 28, 2026 in 1m 42s

Quality Gate failed

Failed conditions
68 Security Hotspots
4.5% Duplication on New Code (required ≤ 3%)
D Reliability Rating on New Code (required ≥ A)
E Security 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 539 in backend/apps/skill_app.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this code to not log user-controlled data.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ00kvwPPU4l3pg_4pB8&open=AZ00kvwPPU4l3pg_4pB8&pullRequest=2731

Check warning on line 13 in frontend/hooks/agent/useSkillList.ts

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=ModelEngine-Group_nexent&issues=AZ0w6PEGlpSFCu4-jD_w&open=AZ0w6PEGlpSFCu4-jD_w&pullRequest=2731

Check failure on line 1275 in test/backend/database/test_skill_db.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this time-dependent expression out of the class body and into a method.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CLgPAYx8a-QOVV0&open=AZ0z2CLgPAYx8a-QOVV0&pullRequest=2731

Check warning on line 1401 in test/backend/database/test_skill_db.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CLgPAYx8a-QOVV5&open=AZ0z2CLgPAYx8a-QOVV5&pullRequest=2731

Check warning on line 203 in frontend/services/skillService.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PHflpSFCu4-jD_-&open=AZ0w6PHflpSFCu4-jD_-&pullRequest=2731

Check failure on line 424 in backend/apps/skill_app.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Document this HTTPException with status code 401 in the "responses" parameter.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ00kvwPPU4l3pg_4pBm&open=AZ00kvwPPU4l3pg_4pBm&pullRequest=2731

Check warning on line 291 in frontend/app/[locale]/agents/components/agentConfig/SkillDetailModal.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PJqlpSFCu4-jEAW&open=AZ0w6PJqlpSFCu4-jEAW&pullRequest=2731

Check warning on line 42 in frontend/app/[locale]/tenant-resources/components/resources/SkillList.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.at(…)` over `[….length - index]`.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PKqlpSFCu4-jEAp&open=AZ0w6PKqlpSFCu4-jEAp&pullRequest=2731

Check failure on line 659 in backend/services/skill_service.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PNAlpSFCu4-jECd&open=AZ0w6PNAlpSFCu4-jECd&pullRequest=2731

Check warning on line 381 in frontend/services/skillService.ts

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=ModelEngine-Group_nexent&issues=AZ0w6PHflpSFCu4-jEAK&open=AZ0w6PHflpSFCu4-jEAK&pullRequest=2731

Check failure on line 37 in docker/sql/v2.0.0_0314_add_context_skill_t.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 3 times.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PPClpSFCu4-jECu&open=AZ0w6PPClpSFCu4-jECu&pullRequest=2731

Check warning on line 196 in frontend/services/skillService.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

arrow function is equivalent to `Number`. Use `Number` directly.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PHflpSFCu4-jD_6&open=AZ0w6PHflpSFCu4-jD_6&pullRequest=2731

Check failure on line 503 in backend/apps/skill_app.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Document this HTTPException with status code 400 in the "responses" parameter.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ00kvwPPU4l3pg_4pB0&open=AZ00kvwPPU4l3pg_4pB0&pullRequest=2731

Check warning on line 120 in frontend/services/skillService.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "RegExp.exec()" method instead.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PHflpSFCu4-jD_0&open=AZ0w6PHflpSFCu4-jD_0&pullRequest=2731

Check failure on line 157 in test/backend/services/test_skill_service.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a nested comment explaining why this function is empty, or complete the implementation.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CJ6PAYx8a-QOVU4&open=AZ0z2CJ6PAYx8a-QOVU4&pullRequest=2731

Check warning on line 318 in test/sdk/core/tools/test_read_skill_md_tool.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CNxPAYx8a-QOVWn&open=AZ0z2CNxPAYx8a-QOVWn&pullRequest=2731

Check warning on line 349 in test/sdk/core/tools/test_run_skill_script_tool.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unused local variable "result".

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CN9PAYx8a-QOVWt&open=AZ0z2CN9PAYx8a-QOVWt&pullRequest=2731

Check warning on line 1399 in test/backend/database/test_agent_version_db.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CMAPAYx8a-QOVWB&open=AZ0z2CMAPAYx8a-QOVWB&pullRequest=2731

Check warning on line 679 in test/sdk/core/tools/test_write_skill_file_tool.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unused local variable "result".

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CNkPAYx8a-QOVWg&open=AZ0z2CNkPAYx8a-QOVWg&pullRequest=2731

Check warning on line 763 in frontend/app/[locale]/agents/components/agentConfig/SkillBuildModal.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PJ1lpSFCu4-jEAn&open=AZ0w6PJ1lpSFCu4-jEAn&pullRequest=2731

Check failure on line 1100 in docker/init.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 3 times.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PPhlpSFCu4-jECz&open=AZ0w6PPhlpSFCu4-jECz&pullRequest=2731

Check failure on line 460 in backend/apps/skill_app.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "Annotated" type hints for FastAPI dependency injection

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ00kvwPPU4l3pg_4pBv&open=AZ00kvwPPU4l3pg_4pBv&pullRequest=2731

Check failure on line 38 in docker/sql/v2.0.0_0314_add_context_skill_t.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 3 times.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PPClpSFCu4-jECs&open=AZ0w6PPClpSFCu4-jECs&pullRequest=2731

Check warning on line 278 in test/sdk/core/tools/test_write_skill_file_tool.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unused local variable "result".

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0z2CNkPAYx8a-QOVWW&open=AZ0z2CNkPAYx8a-QOVWW&pullRequest=2731

Check warning on line 546 in frontend/app/[locale]/tenant-resources/components/resources/SkillList.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `structuredClone(…)` over `JSON.parse(JSON.stringify(…))` to create a deep clone.

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ0w6PKqlpSFCu4-jEA1&open=AZ0w6PKqlpSFCu4-jEA1&pullRequest=2731