-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(HIS): add CALLS his metric #59
base: wip/his-metrics
Are you sure you want to change the base?
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.
While testing this inside the partitioner, I'm getting this log output:
== Checking McCabe Cyclomatic Complexity metric ==
At src/core/main.c(4): complex_function has a complexity of 12. The maximum is 10
"/home/daniel/workspace/osyxtech/bao-partitioner/src/arch/armv8/inc/sysregs.h", line 83: expected pretty much anything after closing paren of function, but got EOF
== Check done with 1 error(s) ==
== Checking the number of called functions ==
At /core/main.c (81): calling_function calls 8 functions.The maximum are 7 calls
cflow:/home/daniel/workspace/osyxtech/bao-partitioner/src/core/console.c:37: chars_writen redefined
cflow:/home/daniel/workspace/osyxtech/bao-partitioner/src/core/console.c:33: this is the place of previous definition
== Check done with 1 error(s) ==
make: *** [ci/ci.mk:299: his-check] Error 255
The first report seems correct, since I introduce those +7 function calls.
The next two reports regarding console.c
seem that the tool is checking other properties outside the scope of the his metric introduced in this PR. Despite not being triggered as an error, I would avoid those out-scope log information.
888be88
to
2b63b06
Compare
Nicely spotted! During my tests that |
2b63b06
to
d4d12b3
Compare
ffdbe14
to
1d6bdbe
Compare
d4d12b3
to
4ed930a
Compare
6a4e321
to
9d71df0
Compare
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.
Small change. Tested it and LGTM.
be420a9
to
c3679fc
Compare
c1452fe
to
4a2edbb
Compare
Signed-off-by: Afonso Santos <[email protected]>
Signed-off-by: Afonso Santos <[email protected]>
I had the change substantially how this metric has been done. Previously the |
Signed-off-by: Afonso Santos <[email protected]>
This PR introduces the feature of checking the number of function calls inside a function.
Each function must only call a maximum of other 7 functions during its execution flow.
The
cflow
tool is used to check this metric.Checklist: