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

Include less v4 #7643

Closed
wants to merge 4 commits into from
Closed

Include less v4 #7643

wants to merge 4 commits into from

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/945

Describe changes:

  • Rework includes as per cppclean

I used this patched version myint/cppclean#165

Still to do : add cppclean as part of CI, so that means having a reproducible cleaner script
There are still 3 missing features in cppclean that produce 6 errors in Suricata :

  • when using #define a(x) b(x) where b is in another file cf SpmSearch
  • when using a field defined in an enum elsewhere as DECODE_EVENT_MAX
  • when using a type defined elsewhere, as a parameter type of a function pointer used in a structure field as FileMatch in SigTableElmt uses File from util-file.h

After that, there are no more errors except for rust headers, suricata-common.h and threads.h cf
cppclean src/*.h | grep "does not need to be #included" | grep -v rust | grep -v suricata-common.h | grep -v threads.h

Modifies #7618 with some more include rework in latest commit

This PR adds about one hundred lines #include "detect-engine-build.h" because it is being used in util tests for SigGroupBuild and such... Any thoughts on that ?

@catenacyber catenacyber mentioned this pull request Jul 26, 2022
@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #7643 (33e91d2) into master (f8bf581) will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7643      +/-   ##
==========================================
+ Coverage   75.75%   75.81%   +0.06%     
==========================================
  Files         659      659              
  Lines      185743   185743              
==========================================
+ Hits       140713   140828     +115     
+ Misses      45030    44915     -115     
Flag Coverage Δ
fuzzcorpus 60.30% <ø> (+0.15%) ⬆️
suricata-verify 52.50% <ø> (+0.07%) ⬆️
unittests 60.71% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@catenacyber
Copy link
Contributor Author

Replaced by #7644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant