-
Notifications
You must be signed in to change notification settings - Fork 8
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
Merge changes in the development branch #53
Conversation
…CommonUtils::CalculateCentreOfGravity
When a PR is created and for each commit of a PR, it will generate static code analysis by using CppCheck and upload the results as a comment
For each commit or PR, it will run tests, and code coverage. It will also upload code coverage results to codecov.io, which can be followed at https://app.codecov.io/gh/CemrgDevelopers/CemrgApp
Add more tests
✅ Code Analysis Results - no issues found! ✅ |
Do we know the issue with the tests? Also looking at the list of code analysis errors many are pure stylistic or about if-conditions related to the verbose code. Duplicate if-conditions can be condensed to one block but there's a number of things flagged that aren't duplicates so these checks maybe should be disabled. |
No error with the tests, it just can't find the macro definition even though it can find the previous macro definition in the CemrgCommandLineTest.cpp. That's weird for sure. I can disable the style checking if it's requested. |
I'm still sifting through the errors in #53 (comment) . But I can say right now that anytime you find a if(verbose)
MITK_INFO << "message"; You can change it for MITK_INFO(verbose) << "message"; that should get rid of a lot of those messages. I'll check the others and comment on them. |
The test job does indicate it failed though, is that not a concern? |
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
========================================
Coverage ? 9.70%
========================================
Files ? 72
Lines ? 12078
Branches ? 0
========================================
Hits ? 1172
Misses ? 10906
Partials ? 0 Continue to review full report at Codecov.
|
Now, I've fixed most of the code analysis problems, only a few important ones are remaining. Please look into them. |
Many of the code issues above relate to some variable set a static value then used in a condition, I guess these are placeholder for setting the values from a GUI element? Others are about variable shadowing so the variable being flagged should be renamed. Those relating to unsafe types I'm not sure exactly what to do, those that don't have constructors but should probably do need constructors. Other things like using prefix ++/-- are clear about what to change. CemrgApp/CemrgApp/Modules/CemrgAppModule/src/CemrgAtriaClipper.cpp Lines 444 the complaint is about 1.0 and 1.5 being cast to unsigned long which 1 in both cases, this should be changed to just be one if that was the intent of the ternary operator or changed to not cast to unsigned long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good 👍
Thanks @onurulgen for an amazing work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alonsoJASL almost everything looks good, only a few comments for you to have a look. Basically:
- We need to create new issues for some of the topics mentioned in these comments, so we don't forget to come back to them in future.
- Also, we have duplication of code in the
cmdapps
, which makes keeping track of changes in plugins and matching them withcmdapps
difficult. I think we need a new issue for this too, to think about solutions in future.
} | ||
|
||
#endif // kcl_cemrgapp_renderwindoweditor_Activator_h | ||
constexpr decltype(CemrgTestData::surfacePaths) CemrgTestData::surfacePaths; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sure what's happening here, is renderwindoweditor
removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, github is taking this CemrgTestCommon.cpp
and comparing it to the recently deleted kcl_cemrgapp_renderwindoweditor_Activator.h
. I don't know why github decided to do that.
{ | ||
BERRY_REGISTER_EXTENSION_CLASS(QmitkCemrgRenderWindowEditor, context) | ||
} | ||
Q_OBJECT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the other comment about the renderwindoweditor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the other comment. For some reason, github caught me deleting the kcl_cemrgapp_renderwindoweditor_Activator.h
and put that change on this test.hpp
.
Not sure why, as they're in very different paths! Do you have any idea about this, @onurulgen ?
For context, I deleted the renderwindow plugin we had in CemrgApp (commit 100fd8), but for some reason, github caught that deletion as a change in this test.hpp file
CemrgApp/Plugins/kcl.cemrgapp.wathca/src/internal/WallThicknessCalculationsView.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @OrodRazeghi for your feedback. I think we can merge this one for now. I created #54, #55, and #57 for the things that need to be addressed but not critically.
No description provided.