Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1066/attribute descriptors for svn tokeii raw #3176

Merged
merged 17 commits into from
Jan 11, 2023

Conversation

phanlezz
Copy link
Collaborator

Adds AttributeDescriptors to svn and tokei

RawTextParser does not need descriptors, because the imported metrics are arbitrary.
Refactored more tests to be junit5.
Updated some deprecated code. Removed some unused.

Issue: #1066

Copy link
Contributor

@friedrich-roskosch-mw friedrich-roskosch-mw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work to update those dependencies! :-)

LGTM % comments and the changelog requires an update.

@phanlezz phanlezz enabled auto-merge (squash) January 11, 2023 12:56
@sonarcloud
Copy link

sonarcloud bot commented Jan 11, 2023

[CodeCharta Analysis] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

98.6% 98.6% Coverage
0.0% 0.0% Duplication

@phanlezz phanlezz merged commit 680f8cb into main Jan 11, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 11, 2023

[CodeCharta Visualization] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

86.9% 86.9% Coverage
0.0% 0.0% Duplication

@phanlezz phanlezz deleted the feature/1066/attribute-descriptors-for-svn-tokeii-raw branch January 11, 2023 13:29
@@ -160,12 +159,12 @@ class VersionControlledFileTest {
// then
assertThat(versionControlledFile.filename).isEqualTo(oldFilename)
assertThat(versionControlledFile.actualFilename).isEqualTo(filename)
assertThat(versionControlledFile.markedDeleted()).isFalse()
assertThat(versionControlledFile.markedDeleted()).isFalse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not a function call anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an attribute provided by the assertion, afaik

@@ -26,7 +26,7 @@ class ProjectMetricsTest {

addMetricToFileInProject(projectMetrics, "foo", "mcc", 99)

Assertions.assertThat(projectMetrics.projectMetrics["foo"]).isEqualToComparingFieldByField(expected)
Assertions.assertThat(projectMetrics.projectMetrics["foo"]!!.fileMetrics).isEqualTo(expected.fileMetrics)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we compare less things in these tests now? Could be change that again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this assertion, because the field by field call is deprecated. The object only contains one attribtue, so calling it direcly for comparison is the same as the deprecated call beforehand. I could generate an equals method for this object, so the behavior would be identical as it was before.
But if another field will get added later, it is likely that the new attribute gets a dedicated test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants