Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors contrib/tool/lint.cfg to “fine tune” the linter/formatter configuration by slimming the file down and introducing a larger, more explicit set of formatting rules.
Changes:
- Replaced the heavily commented config with a compact, option-only config.
- Added/adjusted multiple newline/spacing/alignment-related options to enforce consistent formatting.
- Changed behavior for some formatting features (e.g., macro line-continuation alignment).
| align_func_params = true | ||
| align_func_params_gap = 1 | ||
| align_func_params_span = 6 | ||
| align_keep_extra_space = true | ||
| align_var_def_span = 1 |
There was a problem hiding this comment.
The previous config explicitly set disable_processing_cmt / enable_processing_cmt to *LINT-OFF* / *LINT-ON*. Those settings have been removed, which changes behavior back to the tool defaults (commonly *INDENT-OFF* / *INDENT-ON*) and can break existing LINT-OFF / LINT-ON markers in the codebase. Re-add these two options (or document and migrate the marker convention) to avoid a formatter behavior regression.
| align_func_params = true | ||
| align_func_params_gap = 1 | ||
| align_func_params_span = 6 | ||
| align_keep_extra_space = true | ||
| align_var_def_span = 1 | ||
| align_var_def_thresh = 20 |
There was a problem hiding this comment.
This change removes the header/version marker and the inline comments explaining key options (defaults, intent, and edge cases). For a shared tool config, that makes it harder to safely modify later and to understand which tool/version the file targets. Consider restoring at least a short header comment (tool name/version + link to docs) and brief comments for the few most non-obvious/non-default rules.
| align_var_def_span = 1 | ||
| align_var_def_thresh = 20 | ||
| align_var_struct_span = 3 | ||
| align_typedef_span = 1 |
There was a problem hiding this comment.
align_nl_cont was previously enabled and is now explicitly disabled, which changes how multi-line macro continuations (backslash-newline) are aligned. Since this can significantly affect diffs in macro-heavy code, it would help to add a short rationale inline (why alignment is being disabled) so future edits don’t accidentally reintroduce it or fight the formatter.
| align_typedef_span = 1 | |
| align_typedef_span = 1 | |
| # Disable alignment of backslash-newline macro continuations to avoid large, noisy diffs in macro-heavy code. |
No description provided.