Conversation
klement
commented
Apr 6, 2025
- Improve type safety
- Proper inet_ntop return value check.
- Replace non-standard FUNCTION with C99+ standard func
- Fix return value check
- Remove invalid structure
- Improve type safety
- Add -Wpendantic
cvec_append_var returns a pointer, so a NULL check is appropriate
C spec 6.2.5-20 says that a structure cannot be zero size: A structure type describes a sequentially allocated nonempty set of member objects (and, in certain circumstances, an incomplete array), each of which has an optionally specified name and possibly distinct type. Commenting it out doesn't seem to break anything build-wise.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 53.28% 53.23% -0.05%
==========================================
Files 23 23
Lines 7725 7730 +5
Branches 1782 1784 +2
==========================================
- Hits 4116 4115 -1
- Misses 2588 2592 +4
- Partials 1021 1023 +2
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
olofhagsand
left a comment
There was a problem hiding this comment.
Seems -Wpedantic made codecov error whichin turn failed github actions.
Not OK to fail github actions.
Commen: the codecov action is not that important, it used to be a part of a more complete cligen+clixon coverage, the remaining part is just a subset of the complete task, which means it could be safely remove.
cligen_history.c
Outdated
| int | ||
| hist_add(cligen_handle h, | ||
| char *buf) | ||
| const char *buf) |
There was a problem hiding this comment.
Style: indendation error according to https://github.com/clicon/clixon/blob/master/CONTRIBUTING.md#function-declarations
There was a problem hiding this comment.
Is there a way to invoke linter or do you spot these manually?
I don't see a .clang-format (nor .clang-tidy) - it would be great to have these.
Make strings which are not expected to be modified const. Fix violations. Add -Wwrite-strings to enforce future good behaviour.
Add an explicit cast where it would cause an unnecessary warning.