acassis opened a new pull request, #19465:
URL: https://github.com/apache/nuttx/pull/19465

   ## Summary
   
   When porting external projects to NuttX using uncrustify could help to 
convert "alien code" (maybe we are the aliens) to NuttX coding style.
   
   I decided to do a test: asked an agent to use our uncrustify.cfg and analyze 
the converted files against our coding style. It confirmed the existing 
limitations of uncrustify (i.e. there is not instruction to add new like after 
single line comment, etc). But it improved our uncrustify a lot. Now it is able 
to fix 95% of an external C file.
   
   These are the limitations that uncrustify cannot be enforced:
   
   1. Block comment asterisks to column 78 — uncrustify can't auto-generate the 
`*` line fillers for section headers
   2. Apache 2.0 license header — requires file header template (uncrustify has 
`cmt_insert_file_header` but needs template file)
   3. Order of groupings (Included Files first, then Pre-processor, etc.) — 
structural, not formattable
   4. `FAR` qualifier — can't auto-add to pointer parameters
   5. Header guard #ifndef pattern — can't auto-generate
   6. Sentence case in comments — content, not formatting
   7. US English spelling — content
   8. Two spaces after '.' and ':' in comments — uncrustify doesn't touch 
comment content
   
   ## Impact
   
   It will users to convert code from other projects to NuttX
   
   ## Testing
   
   I tested against the picotts source code that I'm porting to NuttX


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to