Skip to content

Added unit tests and convenience methods, fixed SonarCloud issues, include file cleanup#849

Merged
uweseimet merged 191 commits intodevelopfrom
feature_unit_tests
Sep 25, 2022
Merged

Added unit tests and convenience methods, fixed SonarCloud issues, include file cleanup#849
uweseimet merged 191 commits intodevelopfrom
feature_unit_tests

Conversation

@uweseimet
Copy link
Copy Markdown
Contributor

No description provided.

@uweseimet
Copy link
Copy Markdown
Contributor Author

@akuker All my changes are committed, i.e. this PR is ready for review again
All in all, I reduced the number of SonarCloud issues by about 1400 (compared with the last release).
@rdmark Have you already checked the html and python issues?

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug D 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 30 Code Smells

48.4% 48.4% Coverage
0.3% 0.3% Duplication

@rdmark
Copy link
Copy Markdown
Member

rdmark commented Sep 23, 2022

@uweseimet Do you mean python and html issues reported by Sonarcloud? How can I see them?

@uweseimet
Copy link
Copy Markdown
Contributor Author

@rdmark Just select the branch you are interested in on https://sonarcloud.io/project/overview?id=akuker_RASCSI.

@uweseimet
Copy link
Copy Markdown
Contributor Author

@akuker After the review, I would like to merge this PR myself, because I want to clean up the final log message.

@rdmark
Copy link
Copy Markdown
Member

rdmark commented Sep 23, 2022

@uweseimet Thanks I found the relevant report. Glancing through the Python code smells, vulnerabilities and issues, there are a handful that are worth addressing. Others are known structural issues that pylint has reported already, but are hard to do anything about (complexity, nested if statements, etc.) without major refactoring.

As for the reported html issues: we deliberately use deprecated syntax in order to support ancient web browsers, so none of those are something that we want to address. If we can suppress html syntax deprecation warning that would be great.

So the conclusion here is that I don't think we want to make any changes right now, but put on the backlog to address later.

@uweseimet
Copy link
Copy Markdown
Contributor Author

@rdmark Do issues like those reported for python/common/src/util/unarchiver.py require a major refactoring?

@rdmark
Copy link
Copy Markdown
Member

rdmark commented Sep 24, 2022

@uweseimet I agree that unarchiver.py is the one module with low hanging fruit to potentially fix.
@nucleogenic Do you want to look into it, and perhaps fold changes into a new PR or your ongoing PR?

@nucleogenic
Copy link
Copy Markdown
Member

Hi both,

I will check out the SonarCloud reports soon and raise a new PR for any changes.

The unarchiver module is going to need refactoring to allow it to be unit tested, which is something I'm keen to investigate now we've got pytest set up.



CXXFLAGS += -std=c++17 -iquote . -D_FILE_OFFSET_BITS=64 -MD -MP
CXXFLAGS += -std=c++17 -iquote . -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -MD -MP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just out of curiosity, why was this added?

@akuker
Copy link
Copy Markdown
Member

akuker commented Sep 25, 2022

Approved. feel free to merge!

@uweseimet uweseimet merged commit 016a616 into develop Sep 25, 2022
@uweseimet uweseimet deleted the feature_unit_tests branch September 25, 2022 21:49
@uweseimet
Copy link
Copy Markdown
Contributor Author

@akuker Done, thank you for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants