Skip to content

Commit

Permalink
Add test case for spaces, ensure no clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lcartey committed Oct 23, 2024
1 parent 5b61358 commit cbcf037
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions c/misra/test/rules/RULE-2-5/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,26 @@ void test() {
#if defined(CHECKED_MACRO_BEFORE_3)
#endif

#if defined(CHECKED_MACRO_BEFORE_4)
// clang-format off

#if defined (CHECKED_MACRO_BEFORE_4)
#endif

#if defined( CHECKED_MACRO_BEFORE_5 )
#endif

#if defined(CHECKED_MACRO_BEFORE_5)
#if defined ( CHECKED_MACRO_BEFORE_6 )
#endif

#if defined(CHECKED_MACRO_BEFORE_6)
#if defined CHECKED_MACRO_BEFORE_7
#endif

// clang-format on

#define CHECKED_MACRO_BEFORE_1 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_2 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_3 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_4 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_5 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch
#define CHECKED_MACRO_BEFORE_7 // COMPLIANT - used in branch

0 comments on commit cbcf037

Please sign in to comment.