Skip to content

contrib: fine tune lint.cfg#9032

Draft
riptl wants to merge 1 commit intofiredancer-io:mainfrom
riptl:lint-cfg
Draft

contrib: fine tune lint.cfg#9032
riptl wants to merge 1 commit intofiredancer-io:mainfrom
riptl:lint-cfg

Conversation

@riptl
Copy link
Copy Markdown
Contributor

@riptl riptl commented Mar 25, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 25, 2026 17:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread contrib/tool/lint.cfg
Comment on lines +1 to +5
align_func_params = true
align_func_params_gap = 1
align_func_params_span = 6
align_keep_extra_space = true
align_var_def_span = 1
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread contrib/tool/lint.cfg
Comment on lines +1 to +6
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
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread contrib/tool/lint.cfg
align_var_def_span = 1
align_var_def_thresh = 20
align_var_struct_span = 3
align_typedef_span = 1
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
align_typedef_span = 1
align_typedef_span = 1
# Disable alignment of backslash-newline macro continuations to avoid large, noisy diffs in macro-heavy code.

Copilot uses AI. Check for mistakes.
@riptl riptl marked this pull request as draft March 25, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants