You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/04/25 14:02:00 UTC
[GitHub] [incubator-nuttx] patacongo edited a comment on issue #652: NXStyle: Ignore alignments of block comments at right of code
patacongo edited a comment on issue #652:
URL: https://github.com/apache/incubator-nuttx/issues/652#issuecomment-619383532
Looking back through the PR chekcs for I think I see the issue you are referring to: https://github.com/apache/incubator-nuttx/runs/562410318?check_suite_focus=true
The file is arch/arm/src/imxrt/imxrt_enc.c and these errors were reported:
arch/arm/src/imxrt/imxrt_enc.c:266:78: error: Long line found
arch/arm/src/imxrt/imxrt_enc.c:269:78: error: Long line found
arch/arm/src/imxrt/imxrt_enc.c:272:82: error: Long line found
arch/arm/src/imxrt/imxrt_enc.c:273:80: error: Long line found
arch/arm/src/imxrt/imxrt_enc.c:296:78: error: Long line found
Looking at those, I see that these are not related to the right hand comments at all. These are simply saying that the lines are too long. I verfied each that this is the case. They ARE too long.
261 struct imxrt_qeconfig_s
262 {
263 uint32_t base; /* Register base address */
264 uint32_t init_val; /* Value to initialize position counters to */
265 uint32_t modulus; /* Modulus to use when modulo counting is enabled */
266 uint16_t in_filt_per; /* Period for input filter sampling in # of periph
267 * clock cycles
268 */
269 uint16_t in_filt_cnt; /* # of consecutive input filter samples that must
270 * agree
271 */
272 uint16_t init_flags; /* Flags to control which signals and edge transitions
273 * will reinitialize the position counter. Bits 4-0:
274 * [MOD, REV, XNE, XIP, HNE, HIP]
275 */
276
277 #ifdef CONFIG_DEBUG_SENSORS
278 bool tst_dir_adv; /* Whether to generate down/up test signals */
279 uint8_t tst_period; /* Period of PHASE pulses in # of periph clock cycles */
280 #endif
281 };
And
285 struct imxrt_enc_lowerhalf_s
286 {
287 /* The first field of this state structure must be a pointer to the lower-
288 * half callback structure:
289 */
290
291 FAR const struct qe_ops_s *ops; /* Lower half callback structure */
292
293 /* IMXRT driver-specific fields: */
294
295 FAR const struct imxrt_qeconfig_s *config; /* static configuration */
296 sem_t sem_excl; /* Mutual exclusion semaphore to
297 * ensure atomic 32-bit reads.
298 */
299 };
When I run the current nxstyle against the current imxrt_enc.c I get:
$ tools/nxstyle.exe arch/arm/src/imxrt/imxrt_enc.c
arch/arm/src/imxrt/imxrt_enc.c:1037:81: error: Long line found
arch/arm/src/imxrt/imxrt_enc.c:1043:84: error: Long line found
To things to note:
1. The errors at liness 266-296 no longer appear. That is a regression. They truly are too long.
2. New long lines are reported at 1037 and 1043. These are correct and appear not due to a recent fix to nxstyle.
So I am thinking that this Issue should be closed. Please give your feeback before I close it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org