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

nxstyle: No error reported on long right hand comments #1078

Open
patacongo opened this issue May 19, 2020 · 1 comment
Open

nxstyle: No error reported on long right hand comments #1078

patacongo opened this issue May 19, 2020 · 1 comment
Labels
bug Something isn't working Standards NuttX application interfaces must compy to standards

Comments

@patacongo
Copy link
Contributor

patacongo commented May 19, 2020

The following does not generate a long line error. It should, of course:

/****************************************************************************
 * junk.c
 ****************************************************************************/

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <stdint.h>

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

#define A_PREPROCESSOR_DEFINITION 0  /* With a a very long, single-line right hand comment.  No error is reported by nxstyle. */

/****************************************************************************
 * Private Types
 ****************************************************************************/

struct a_struct_s
{
  uint8_t f; /* This is a very long line in a single-line, right-hand comment.   No error is reported by nxstyle. */
};

/****************************************************************************
 * Public Functions
 ****************************************************************************/

Related: Issue #652

@patacongo
Copy link
Contributor Author

It is not recommended that this issue be fixed quickly. There are many header files, especially under arch/ that have long lines of this type that would then be reported. We can't afford that workload now.

There are a couple of places where this should be reported in nxstyle.c. One of them has already been fixed, but intentionally disabled for that reason:

2422           /* Check for long lines
2423            *
2424            * REVISIT:  Long line checks suppressed on right hand comments
2425            * for now.  This just prevents a large number of difficult-to-
2426            * fix complaints that we would have otherwise.
2427            */
2428
2429           if (m > g_maxline && !rhcomment)
2430             {
2431               if (g_file_type == C_SOURCE)
2432                 {
2433                   ERROR("Long line found", lineno, m);
2434                 }
2435               else if (g_file_type == C_HEADER)
2436
2437                 {
2438                   WARN("Long line found", lineno, m);
2439                 }
2440             }
2441         }

@patacongo patacongo added bug Something isn't working Standards NuttX application interfaces must compy to standards labels May 20, 2020
Shunichi-K pushed a commit to SPRESENSE/nuttx that referenced this issue Nov 7, 2022
…1078)

HiFive1 with qemu

* arch: risc-v: Add include/.gitignore

* arch: risc-v: Add src/.gitignore

* arch: risc-v: Remove uncommon function prototypes in include/irq.h

* arch: risc-v: Add missing symbols and function prototypes in src/common/up_internal.h

* arch: risc-v: Add src/common/up_modifyreg32.c

* arch: risc-v: Enable include Make.dep in src/Makefile

* arch: risc-v: Fix stack coloration in common/up_createstack.c

* arch: risc-v: Add common/up_puts.c

* arch: risc-v: Add common/up_checkstack.c

* arch: rv32im: Move all logics from up_dumpstate.c to up_assert.c

    This change is same as other architectures like arm/src/armv7-m

* arch: Select ARCH_HAVE_STACKCHECK for RISC-V in Kconfig

* arch: risc-v: Add SiFive fe310 processor

    NOTE: Currently only tested with qemu

* boards: hifive1-revb: Add SiFive hifive1-revb board

    NOTE: Currently only tested with qemu

* tools: Add fe310 processor to configure.sh

Approved-by: Alan Carvalho de Assis <[email protected]>
Approved-by: Gregory Nutt <[email protected]>
(cherry picked from commit 7a8e958)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Standards NuttX application interfaces must compy to standards
Projects
None yet
Development

No branches or pull requests

1 participant