From c46f470d6bb43534473ba85abb3663641f8c868f Mon Sep 17 00:00:00 2001 From: gberkes Date: Wed, 7 Aug 2024 10:39:06 +0200 Subject: [PATCH] Refactor: moved 3 #include directives to the top of the file. To aid code readability, all #include directives in a code file should be grouped together near the top. The only items that may precede an #include in a file are other preprocessor directives or comments. Reference: https://sonarcloud.io/project/issues?sinceLeakPeriod=true&issueStatuses=OPEN%2CCONFIRMED&id=owasp-modsecurity_ModSecurity&open=AY8-ffgqm_fzkWiCOtCs&tab=code Deleted some unnecessary trailing spaces as well. --- headers/modsecurity/modsecurity.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/headers/modsecurity/modsecurity.h b/headers/modsecurity/modsecurity.h index 192cd22e..d44ad248 100644 --- a/headers/modsecurity/modsecurity.h +++ b/headers/modsecurity/modsecurity.h @@ -38,10 +38,10 @@ * std::cout << "There is an intervention" << std::endl; * } * - * ... + * ... * * @endcode - * + * */ /** @@ -81,6 +81,11 @@ #endif +#include "modsecurity/intervention.h" +#include "modsecurity/transaction.h" +#include "modsecurity/debug_log.h" + + #ifndef HEADERS_MODSECURITY_MODSECURITY_H_ #define HEADERS_MODSECURITY_MODSECURITY_H_ @@ -160,7 +165,7 @@ namespace modsecurity { LoggingPhase, /** * Just a marking for the expected number of phases. - * + * */ NUMBER_OF_PHASES, }; @@ -170,11 +175,6 @@ namespace modsecurity { #endif - -#include "modsecurity/intervention.h" -#include "modsecurity/transaction.h" -#include "modsecurity/debug_log.h" - /** * TAG_NUM: *