-
-
Notifications
You must be signed in to change notification settings - Fork 206
feat: improve formatting of error messages from C #2515
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
base: main
Are you sure you want to change the base?
Conversation
I've added punctuation at the end of most messages in the C core now, but a few are still left out. This is a nice-to-have aesthetic feature, it's not an absolute must unless you want to append extra text at the end of the message. We do correct for missing punctuation in both the Python and Mathematica interfaces. |
Isn't this already there with LGTM, but I didn't test. |
Co-authored-by: Szabolcs Horvát <[email protected]>
|
Thank you @szhorvat @schochastics! |
|
@szhorvat with your change the path wasn't simplified any longer, does my fix make any sense? |
|
I'm sorry, I can't seem to see your fix, but I'm in a rush and may be missing something. I believe my mistake is that 1 needs to be subtracted from |
src/rinterface_extra.c
Outdated
| * build procedure, namely on the directory that the compiler is invoked from. */ | ||
| static inline const char* simplify_file_path(const char *file) { | ||
| const char prefix[] = "vendor/cigraph/src/"; | ||
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]); |
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.
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]); | |
| const size_t prefix_len = sizeof(prefix) / sizeof(prefix[0]) - 1; |
|
oops my push hadn't worked... anyhow thanks a ton!! |
Fix #2202
One thing we might consider adding, is a period at the end of the message if it's not already there.