Skip to content

feat: implement T6: Write command tests for SearchCommand

1c4c6cf
Select commit
Loading
Failed to load commit list.
Merged

feat: US-04-05 CLI Search Command #28

feat: implement T6: Write command tests for SearchCommand
1c4c6cf
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 6, 2026 in 38s

Quality Gate failed

Failed conditions
74.7% Coverage on New Code (required ≥ 80%)
B 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 224 in backend/src/test/java/io/megabrain/cli/SearchResultFormatterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WmZwqQopZrMFQr&open=AZzFj-WmZwqQopZrMFQr&pullRequest=28

Check failure on line 93 in backend/src/main/java/io/megabrain/cli/IngestCommand.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YSZwqQopZrMFQz&open=AZzFj-YSZwqQopZrMFQz&pullRequest=28

Check warning on line 474 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQV&open=AZzFj-TzZwqQopZrMFQV&pullRequest=28

Check warning on line 81 in backend/src/test/java/io/megabrain/cli/CliSyntaxHighlighterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WMZwqQopZrMFQe&open=AZzFj-WMZwqQopZrMFQe&pullRequest=28

Check warning on line 197 in backend/src/main/java/io/megabrain/cli/SearchCommand.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "Math.clamp" instead of "Math.min" or "Math.max".

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YvZwqQopZrMFQ_&open=AZzFj-YvZwqQopZrMFQ_&pullRequest=28

Check warning on line 193 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isZero() instead.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQM&open=AZzFj-TzZwqQopZrMFQM&pullRequest=28

Check warning on line 536 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQY&open=AZzFj-TzZwqQopZrMFQY&pullRequest=28

Check warning on line 313 in backend/src/test/java/io/megabrain/cli/SearchCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WaZwqQopZrMFQg&open=AZzFj-WaZwqQopZrMFQg&pullRequest=28

Check warning on line 248 in backend/src/main/java/io/megabrain/api/SearchResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-W7ZwqQopZrMFQw&open=AZzFj-W7ZwqQopZrMFQw&pullRequest=28

Check warning on line 291 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isZero() instead.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQS&open=AZzFj-TzZwqQopZrMFQS&pullRequest=28

Check warning on line 35 in backend/src/test/java/io/megabrain/cli/CliSyntaxHighlighterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WMZwqQopZrMFQa&open=AZzFj-WMZwqQopZrMFQa&pullRequest=28

Check warning on line 196 in backend/src/main/java/io/megabrain/cli/CliSyntaxHighlighter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce the total number of break and continue statements in this loop to use at most one.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YeZwqQopZrMFQ3&open=AZzFj-YeZwqQopZrMFQ3&pullRequest=28

Check warning on line 191 in backend/src/main/java/io/megabrain/api/SearchResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' and ensure that the list is unmodified.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-W7ZwqQopZrMFQv&open=AZzFj-W7ZwqQopZrMFQv&pullRequest=28

Check warning on line 37 in backend/src/main/java/io/megabrain/cli/CliSyntaxHighlighter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Simplify this regular expression to reduce its complexity from 26 to the 20 allowed.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YeZwqQopZrMFQ8&open=AZzFj-YeZwqQopZrMFQ8&pullRequest=28

Check failure on line 29 in backend/src/main/java/io/megabrain/api/SearchResultMapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YDZwqQopZrMFQy&open=AZzFj-YDZwqQopZrMFQy&pullRequest=28

Check warning on line 153 in backend/src/main/java/io/megabrain/cli/IngestCommand.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YSZwqQopZrMFQ1&open=AZzFj-YSZwqQopZrMFQ1&pullRequest=28

Check warning on line 139 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isZero() instead.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQJ&open=AZzFj-TzZwqQopZrMFQJ&pullRequest=28

Check warning on line 114 in backend/src/main/java/io/megabrain/cli/CliSyntaxHighlighter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce the total number of break and continue statements in this loop to use at most one.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YeZwqQopZrMFQ2&open=AZzFj-YeZwqQopZrMFQ2&pullRequest=28

Check warning on line 159 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQK&open=AZzFj-TzZwqQopZrMFQK&pullRequest=28

Check warning on line 141 in backend/src/test/java/io/megabrain/cli/SearchResultFormatterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WmZwqQopZrMFQm&open=AZzFj-WmZwqQopZrMFQm&pullRequest=28

Check warning on line 60 in backend/src/main/java/io/megabrain/cli/CliSyntaxHighlighter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-YeZwqQopZrMFQ4&open=AZzFj-YeZwqQopZrMFQ4&pullRequest=28

Check warning on line 152 in backend/src/main/java/io/megabrain/api/SearchResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested try block into a separate method.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-W7ZwqQopZrMFQs&open=AZzFj-W7ZwqQopZrMFQs&pullRequest=28

Check warning on line 496 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isZero() instead.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQX&open=AZzFj-TzZwqQopZrMFQX&pullRequest=28

Check warning on line 72 in backend/src/test/java/io/megabrain/cli/CliSyntaxHighlighterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-WMZwqQopZrMFQd&open=AZzFj-WMZwqQopZrMFQd&pullRequest=28

Check warning on line 71 in backend/src/test/java/io/megabrain/cli/IngestCommandTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Join these multiple assertions subject to one assertion chain.

See more on https://sonarcloud.io/project/issues?id=olexmal_MegaBrain&issues=AZzFj-TzZwqQopZrMFQH&open=AZzFj-TzZwqQopZrMFQH&pullRequest=28