This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit ea1863ec authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Sonar clean up

parent 071215ef
3 merge requests!1772023 März Release,!170Sonar clean up,!146Put the sonar-analyze job into a separate stage
......@@ -24989,7 +24989,6 @@
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.66.0.tgz",
"integrity": "sha512-NJNtGT7IKpGzdW7Iwpn/09OXz9inIkeIQ/ibY6B+MdV1x6+uReqz/5z1L89ezWnpPDWpXF0TY5PCYKQdWVn8Vg==",
"dev": true,
"peer": true,
"dependencies": {
"@types/eslint-scope": "^3.7.0",
"@types/estree": "^0.0.50",
......@@ -25420,15 +25419,13 @@
"version": "0.0.50",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/webpack/node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
......@@ -25445,7 +25442,6 @@
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"peer": true,
"peerDependencies": {
"ajv": "^6.9.1"
}
......@@ -25455,7 +25451,6 @@
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.8.x"
}
......@@ -25464,15 +25459,13 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/webpack/node_modules/schema-utils": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
"dev": true,
"peer": true,
"dependencies": {
"@types/json-schema": "^7.0.8",
"ajv": "^6.12.5",
......@@ -45045,7 +45038,6 @@
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.66.0.tgz",
"integrity": "sha512-NJNtGT7IKpGzdW7Iwpn/09OXz9inIkeIQ/ibY6B+MdV1x6+uReqz/5z1L89ezWnpPDWpXF0TY5PCYKQdWVn8Vg==",
"dev": true,
"peer": true,
"requires": {
"@types/eslint-scope": "^3.7.0",
"@types/estree": "^0.0.50",
......@@ -45077,15 +45069,13 @@
"version": "0.0.50",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
"dev": true,
"peer": true
"dev": true
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"peer": true,
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
......@@ -45098,29 +45088,25 @@
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"peer": true,
"requires": {}
},
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"peer": true
"dev": true
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"peer": true
"dev": true
},
"schema-utils": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
"dev": true,
"peer": true,
"requires": {
"@types/json-schema": "^7.0.8",
"ajv": "^6.12.5",
package at.ac.uibk.gitsearch.web.rest;
import at.ac.uibk.gitsearch.es.model.DocumentInfo;
import at.ac.uibk.gitsearch.repository.search.GitFilesRepository;
import at.ac.uibk.gitsearch.service.dto.GitFilesAggregationDTO;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* REST controller for managing {@link DocumentInfo}.
*/
@RestController
@RequestMapping("/api")
@Transactional
public class GitFilesResource {
private final Logger log = LoggerFactory.getLogger(GitFilesResource.class);
@Value("${jhipster.clientApp.name}")
@SuppressWarnings({ "unused", "PMD.ImmutableField" })
private String applicationName;
private final GitFilesRepository gitFilesRepository;
public GitFilesResource(GitFilesRepository gitFilesRepository) {
this.gitFilesRepository = gitFilesRepository;
}
/**
* // * {@code SEARCH /_search/git-files/page-details?query=:query} : search for the searchResult corresponding
* // * to the query.
* // *
* // * @param query the query of the searchResult search.
* // * @return the result of the search.
* //
*/
/*
@GetMapping("/_search/git-files/page-details")
public GitFilesPageDetailsDTO
gitFilesPageDetails(@RequestParam String fulltextQuery, @RequestParam String metadataProgrammingLanguage,
@RequestParam String metadataKeywords, @RequestParam String metadataNaturalLanguage,
@RequestParam String metadataLicense, @RequestParam String metadataAuthor,
@RequestParam List<String> selectedRepository,
@RequestParam List<String> selectedUniversity, @RequestParam List<String> selectedFileFormat,
@RequestParam int page, @RequestParam int pageSize) throws IOException {
SearchInputDTO searchInput = new SearchInputDTO(fulltextQuery, metadataProgrammingLanguage, metadataKeywords,
metadataNaturalLanguage, metadataLicense, metadataAuthor, selectedRepository, selectedUniversity,
selectedFileFormat, page);
log.debug("REST request to search gitFilesPageDetails for searchInput {}, pageSize {}", searchInput, pageSize);
// return searchResultSearchRepository.findByContent(query);
return gitFilesRepository.pageDetails(searchInput, pageSize);
}
*/
/**
* // * {@code SEARCH /_search/git-files/aggregation?query=:query} : search for the searchResult corresponding
* // * to the query.
* // *
* // * @param query the query of the searchResult search.
* // * @return the result of the search.
* //
*/
@GetMapping("/_search/git-files/aggregation")
public GitFilesAggregationDTO gitFilesAggregation(@RequestParam String query) throws IOException {
log.debug("REST request to search gitFilesAggregation for query {}", query);
// return searchResultSearchRepository.findByContent(query);
return gitFilesRepository.aggregation(query);
}
}
package at.ac.uibk.gitsearch.repository.search;
import static org.junit.jupiter.api.Assertions.fail;
import at.ac.uibk.gitsearch.GitsearchApp;
import at.ac.uibk.gitsearch.service.dto.GitFilesPageDetailsDTO;
import java.io.IOException;
import org.codeability.sharing.plugins.api.search.SearchInputDTO;
import org.codeability.sharing.plugins.api.search.SearchInputMetadataDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
/**
* is test fixture is currently empty. It seems very hard, to provide trivial tests.
* TODO: Either remove GitFilesRepository infrastructure, or provide good tests.
* @author Michael Breu
*
*/
@SpringBootTest(classes = GitsearchApp.class)
class GitFilesRepositoryImplIT {
@Autowired
private GitFilesRepository gitFilesRepository;
// @Test
void testPageDetails() throws IOException {
final SearchInputMetadataDTO searchMetadata = new SearchInputMetadataDTO(null, "testing", null, null, null, null);
SearchInputDTO searchQuery = new SearchInputDTO(null, searchMetadata, null, null, null, 0);
@SuppressWarnings("unused")
GitFilesPageDetailsDTO searchResultPage = gitFilesRepository.pageDetails(searchQuery);
}
// @Test
void testAggregation() {
fail("Not yet implemented");
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment