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

456-fix-error-codes #475

Open
wants to merge 19 commits into
base: latest
Choose a base branch
from
Open

Conversation

Ankaa19
Copy link

@Ankaa19 Ankaa19 commented Nov 3, 2024

add errors to facility functions #456

Error handling code was created for the following functions:

  • stumpless_get_facility_string
  • stumpless_get_facility_enum
  • stumpless_get_facility_enum_from_buffer

Copy link
Owner

@goatshriek goatshriek left a comment

Choose a reason for hiding this comment

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

It's unclear to me why you've chosen to implement a file-specific error code instead of using the error code functionality already present in the library.

Please rework this change to use the library's existing error code functions (defined in src/error.c and used extensively throughout the project).

include/private/.idea/.gitignore Outdated Show resolved Hide resolved
@Ankaa19
Copy link
Author

Ankaa19 commented Nov 7, 2024

hello, I change my pull request according to your comment. Is it ok?

@goatshriek
Copy link
Owner

Please remove the .idea folder from the commits, and add tests as described in the original issue.

@Ankaa19 Ankaa19 force-pushed the 456-fix-error-codes branch from 8085731 to ef3e531 Compare November 21, 2024 19:34
@Ankaa19
Copy link
Author

Ankaa19 commented Nov 21, 2024

Hello,
sorry for delay. I was sick. I added tests according to the requirements in the issue to the pull request.
Please check it and if it's ok could you merge it?

@goatshriek
Copy link
Owner

You'll need to get the tests passing, of course. From the one that I looked at you'll probably need to do a few rounds of tweaks and rebuilds.

@Ankaa19
Copy link
Author

Ankaa19 commented Nov 25, 2024

Sorry, this is my first time working with tests. I edit them and all tests passed. Is it ok this way?

@Ankaa19
Copy link
Author

Ankaa19 commented Nov 28, 2024

I'm sorry for inconvenience, in the previous edit here on github, not all the edits I have made have been changed. Can you please run the control again? I edited it now.

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.07%. Comparing base (b638f77) to head (dd7de98).
Report is 2 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest     #475      +/-   ##
==========================================
- Coverage   90.40%   90.07%   -0.34%     
==========================================
  Files          47       47              
  Lines        4388     4421      +33     
  Branches      588      595       +7     
==========================================
+ Hits         3967     3982      +15     
- Misses        286      295       +9     
- Partials      135      144       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@goatshriek goatshriek left a comment

Choose a reason for hiding this comment

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

Please see the first round of requested changes below, in addition to correcting the header check in the static analysis run that failed.

.gitignore Outdated Show resolved Hide resolved
src/facility.c Outdated Show resolved Hide resolved
src/facility.c Outdated Show resolved Hide resolved
test/function/facility.cpp Outdated Show resolved Hide resolved
test/function/facility.cpp Show resolved Hide resolved
@Ankaa19
Copy link
Author

Ankaa19 commented Dec 4, 2024

Requested changes have been done.

@goatshriek goatshriek self-assigned this Dec 8, 2024
@Ankaa19
Copy link
Author

Ankaa19 commented Dec 8, 2024

I dont understant it. I set expect true but in errors is that it expect false. How it is possible?
I see that you assigned pull request on you so I shouldn't continue with it?

@goatshriek
Copy link
Owner

I see that you assigned pull request on you so I shouldn't continue with it?

No, it's assigned so that you know who is reviewing it and responsible for giving you feedback when needed.

I haven't run the tests myself - are they passing when you run them locally? Have you tried adding some print statements or running the test using a debugger (e.g. gdb ./function-test-facility from the build directory) with breakpoints to understand the execution flow?

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.

2 participants