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 v3 #7618

Closed
wants to merge 2 commits into from
Closed

Include less v3 #7618

wants to merge 2 commits into from

Conversation

catenacyber
Copy link
Contributor

@catenacyber catenacyber commented Jul 7, 2022

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

Describe changes:

  • Rework includes as per cppclean

Still to do : add cppclean as part of CI, so that means having a reproducible cleaner script

I used this patched version myint/cppclean#165

There are still exceptions :

  • About Suricata : When "rust.h" or "suricata-common.h" gets included, and when includes is rust.h or rust-context.h
  • About cppclean
    • when using macros such as TAILQ with including queue.h (or red and black tree)
    • when using the array size, such as ``uint8_t plugin_v[PLUGIN_VAR_SIZE]; in decode.h needing suricata-plugin.h
    • when using #define a(x) b(x) where b is in another file cf SpmSearch
      The result is less includes from header file to another, nothing is done for C files including a useless header

Modifies #7570 with rebase and dummy commit to check if it passes CI

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 7, 2022
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #7618 (c53e0fc) into master (a2f857e) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head c53e0fc differs from pull request most recent head dc7f061. Consider uploading reports for the commit dc7f061 to get more accurate results

@@            Coverage Diff             @@
##           master    #7618      +/-   ##
==========================================
- Coverage   75.73%   75.72%   -0.01%     
==========================================
  Files         659      659              
  Lines      185740   185740              
==========================================
- Hits       140669   140657      -12     
- Misses      45071    45083      +12     
Flag Coverage Δ
fuzzcorpus 59.85% <ø> (+<0.01%) ⬆️
suricata-verify 52.41% <ø> (-0.03%) ⬇️
unittests 60.71% <ø> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 8149

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 8150

@catenacyber
Copy link
Contributor Author

Replaced by #7643

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.

2 participants