Skip to content

uncrustify 0.68 does not accept line length 999 #340

@jacobperron

Description

@jacobperron

Bug report

Required Info:

  • Operating System:
    • macOS
  • Installation type:
    • N/A
  • Version or commit hash:
    • Crystal
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

With uncrustify v0.68 installed (default for macOS) we get errors for packages that use rosidl generators related to the code_width variable. E.g.:

    Option<UNUM>: at /var/folders/cl/kf4w4g450n14r3mvm95yt9tw0000gn/T/uncrustify_bc3goxjd:2241: requested value 999 for option code_width is greater than the maximum value 0
    Option<UNUM>: at /var/folders/cl/kf4w4g450n14r3mvm95yt9tw0000gn/T/uncrustify_bc3goxjd:2241: Expected unsigned number for code_width; got '999'
    Output prefix: /var/folders/cl/kf4w4g450n14r3mvm95yt9tw0000gn/T/uncrustify_1dbjacdr/
    Output suffix: .uncrustify

Expected behavior

No uncrustify errors.

Actual behavior

Uncrustify errors and test fails.

Additional information

An upper bound of 256 for the uncrustify option, code_width, was introduced in uncrustify/uncrustify#1852, specifically:

https://github.com/uncrustify/uncrustify/pull/1852/files#diff-0799bb9998b90a7d6cbaf9f6679b6938R2461

We are attempting to bypass any line length issues by passing a value of 999 in several places:

Along with other rosidl repos.


Looks like a solution for ignoring line length for generated files is to set code_width to 0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions