You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "acassis (via GitHub)" <gi...@apache.org> on 2025/02/13 15:13:48 UTC

[I] [BUG] nxstyle cannot catch "case" with text in the same line [nuttx]

acassis opened a new issue, #15838:
URL: https://github.com/apache/nuttx/issues/15838

   ### Description / Steps to reproduce the issue
   
   Example:
   ```
           case 0: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO0_BASE;
               break;
           case 1: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO1_BASE;
               break;
           case 2: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO2_BASE;
               break;
           case 3: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO3_BASE;
               break;
   ```
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   Ubuntu
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: all]
   
   ### Issue Area
   
   [Area: Other]
   
   ### Host information
   
   nxstyle needs to be fixed to report error case some text come after "case" statement
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] nxstyle cannot catch "case" with text in the same line [nuttx]

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl closed issue #15838: [BUG] nxstyle cannot catch "case" with text in the same line
URL: https://github.com/apache/nuttx/issues/15838


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] nxstyle cannot catch "case" with text in the same line [nuttx]

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #15838:
URL: https://github.com/apache/nuttx/issues/15838#issuecomment-5407887095

   its already fixed:
   
   ```
    53 void foo(void)
    54 {
    55   switch (1)
    56     {
    57       case 0: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO0_BASE;
    58         break;
    59       case 1: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO1_BASE;
    60         break;
    61       case 2: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO2_BASE;
    62         break;
    63       case 3: gpio_regs = (max32690_gpio_regs_t *)MAX326_GPIO3_BASE;
    64         break;
    65     }
    66 }
   
   ```
   
   
   ```
   /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:57:12: error: Case statement should be on a new line
   /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:59:12: error: Case statement should be on a new line
   /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:61:12: error: Case statement should be on a new line
   /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:63:12: error: Case statement should be on a new line
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org