-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add transitive reduction algorithm #304
Conversation
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.
Cppcheck (reported by Codacy) found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
Do you can check if is possible to eliminate at least the "violations" reported by cppcheck?
I've fixed a few of the "violations". Some of them seem intended for C, such as MISRA 17.8, as reference parameter modification is bread-and-butter in C++ (in C++, programmers use Some of the other violations, such as MISRA 15.5, are necessary as optimizations. Early return from function is common practice to speed up function calls, and refractoring the function to support leaving loops quickly would result in code that is difficult to understand. I've dismissed the violations on code in which this PR is not concerned, as it is irrelevant to the PR. |
@@ -2999,7 +3074,7 @@ | |||
|
|||
// Since the matrix represents the adjacency matrix, it must be square | |||
if (n_rows != n_cols) { | |||
return -1; | |||
return -1; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 15.5 rule
* satisfied. | ||
* | ||
*/ | ||
virtual const Graph<T> transitiveReduction() const; |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 802 with no text in the supplied rule-texts-file
Codecov Report
@@ Coverage Diff @@
## master #304 +/- ##
==========================================
- Coverage 97.71% 97.55% -0.17%
==========================================
Files 51 53 +2
Lines 7189 7449 +260
==========================================
+ Hits 7025 7267 +242
- Misses 164 182 +18
Flags with carried forward coverage won't be shown. Click here to find out 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.
Good Job!
A good pull request has the following information: