Skip to content

Commit

Permalink
Feature/2489/Remove-suspicious-metrics-from-custom-config (#2564)
Browse files Browse the repository at this point in the history
* Remove connection between custom config and suspicious metrics and update links for suspicious metrics views
#2489

* Update applySuspiciousMetric method and remove unnecessary css class
#2489

* Update tests
#2489

* Adjust tests for dispatching states when selecting a suspicious metric
#2489

* Update CHANGELOG.md
#2489

* fix changelog #2489

* Remove ToDo Comment
# 2489

* Remove unnecessary line in CHANGELOG.md
# 2489

* Fix broken SCMLogParser tests
# 2489

* Update CHANGELOG.md correctly
# 2589

Co-authored-by: Ihsen Bouallegue <48621967+IhsenBouallegue@users.noreply.github.com>
Co-authored-by: IhsenBouallegue <bouallegueihsen@gmail.com>
  • Loading branch information
3 people committed Dec 31, 2021
1 parent 206c085 commit bfde98b
Show file tree
Hide file tree
Showing 10 changed files with 477 additions and 472 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

## [unreleased] (Added 🚀 | Changed | Removed 🗑 | Fixed 🐞 | Chore 👨‍💻 👩‍💻)

### Changed

- Remove suspicious metrics from custom map configurations [#2564](https://github.com/MaibornWolff/codecharta/pull/2564).

## [1.86.0] - 2021-12-20

### Added 🚀
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import de.maibornwolff.codecharta.importer.scmlogparser.parser.git.GitLogNumstat
import de.maibornwolff.codecharta.importer.scmlogparser.parser.git.GitLogParserStrategy
import de.maibornwolff.codecharta.importer.scmlogparser.parser.svn.SVNLogParserStrategy
import de.maibornwolff.codecharta.model.Project
import de.maibornwolff.codecharta.model.ProjectMatcher
import de.maibornwolff.codecharta.serialization.ProjectDeserializer
import de.maibornwolff.codecharta.serialization.ProjectSerializer
import org.junit.Assert
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
Expand Down Expand Up @@ -71,14 +70,13 @@ class SCMLogProjectCreatorGoldenTest(
val expectedProject = ProjectDeserializer.deserializeProject(ccjsonReader)
val resource = this.javaClass.classLoader.getResource(logFilename)
val logStream = Files.lines(Paths.get(resource!!.toURI()))

// when
val svnProject = svnSCMLogProjectCreator.parse(logStream)
// This step is necessary because the comparison of the attribute map in MutableNode fails if the project is used directly;
val svnProjectForComparison = serializeAndDeserializeProject(svnProject)

// then
Assert.assertThat(svnProjectForComparison, ProjectMatcher.matchesProjectUpToVersion(expectedProject))
assertThat(svnProjectForComparison).usingRecursiveComparison().isEqualTo(expectedProject)
}

@Throws(IOException::class)
Expand Down
82 changes: 48 additions & 34 deletions analysis/import/SCMLogParser/src/test/resources/expected_git.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
{
"projectName": "SCMLogParser",
"apiVersion": "1.0",
"nodes": [
{
"name": "root",
"type": "Folder",
"attributes": {},
"link": "",
"children": [
{
"name": "afolder",
"type": "Folder",
"attributes": {},
"link": "",
"children": [
{
"name": "fileinfolder",
"type": "File",
"attributes": {
"weeks_with_commits": 1,
"range_of_weeks_with_commits": 1,
"number_of_commits": 2,
"successive_weeks_with_commits": 1,
"number_of_authors": 1
},
"link": "",
"children": []
}
]
}
]
}
]
}
"checksum": "foo",
"data":{
"projectName": "",
"apiVersion": "1.3",
"nodes": [
{
"name": "root",
"type": "Folder",
"attributes": {},
"link": "",
"children": [
{
"name": "afolder",
"type": "Folder",
"attributes": {},
"link": "",
"children": [
{
"name": "fileinfolder",
"type": "File",
"attributes": {
"weeks_with_commits": 1,
"range_of_weeks_with_commits": 1,
"number_of_commits": 2,
"successive_weeks_with_commits": 1,
"number_of_authors": 1
},
"link": "",
"children": []
}
]
}
]
}
],
"attributeTypes": {
"nodes": {
"number_of_authors": "relative",
"number_of_commits": "absolute",
"range_of_weeks_with_commits": "relative",
"successive_weeks_with_commits": "relative",
"weeks_with_commits": "relative"
},
"edges": {}
},
"blacklist": []
}
}

0 comments on commit bfde98b

Please sign in to comment.