Skip to content

feat(init): configure line length during init#218

Merged
zeitlinger merged 2 commits intomainfrom
codex/init-line-length
Apr 23, 2026
Merged

feat(init): configure line length during init#218
zeitlinger merged 2 commits intomainfrom
codex/init-line-length

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

Adds a line-length preference to flint init and uses it when generating init-owned formatter/config files.

  • Defaults line length to 120 for --yes and non-custom flows.
  • Lets interactive users adjust line length on the existing category-selection screen with left/right arrows, without adding another prompt screen.
  • Generates or patches .editorconfig with max_line_length when no explicit global value exists.
  • Threads the selected line length into generated .rumdl.toml and .yamllint.yml.
  • Splits init config-file generation and scaffold generation into smaller modules.
  • Updates Renovate metadata for the moved generated workflow template.

Validation

  • cargo test
  • mise run lint:fix

@zeitlinger zeitlinger marked this pull request as ready for review April 23, 2026 16:22
@zeitlinger zeitlinger requested a review from a team as a code owner April 23, 2026 16:22
Copilot AI review requested due to automatic review settings April 23, 2026 16:22
Comment thread README.md Outdated
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

Adds a configurable line-length preference to flint init, using it when generating init-owned formatting/config files (notably .editorconfig, .rumdl.toml, and .yamllint.yml) and refactors init generation code into smaller modules.

Changes:

  • Adds an interactive left/right arrow control on the category-selection UI to set line length (default 120).
  • Generates or patches .editorconfig to include max_line_length when not already set globally, and threads line length into .rumdl.toml / .yamllint.yml.
  • Splits init responsibilities into config_files and scaffold modules, updating Renovate metadata accordingly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/init/ui.rs Adds interactive line-length adjustment to the category selector UI.
src/init/mod.rs Threads selected line length through init flow; wires new modules and adds tests.
src/init/config_files.rs New module for generating/patching init-owned config files (incl. .editorconfig).
src/init/scaffold.rs New module for workflow/template + mise task/env scaffolding moved out of generation.rs.
src/init/generation.rs Removes moved config/scaffold functions (now in config_files / scaffold).
tests/cases/general/init-rust/test.toml Updates expected init output to include .editorconfig patching.
tests/cases/general/init-idempotent/files/.editorconfig Updates fixture to include max_line_length.
README.md Updates example config comment for base_branch.
.github/renovate.json5 Points Renovate regex managers at the moved workflow template location.
.github/renovate-tracked-deps.json Updates tracked-deps mapping to the new scaffold file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/init/config_files.rs Outdated
Signed-off-by: Gregor Zeitlinger <[email protected]>
@zeitlinger zeitlinger merged commit 28a4f24 into main Apr 23, 2026
13 of 15 checks passed
@zeitlinger zeitlinger deleted the codex/init-line-length branch April 23, 2026 17:14
zeitlinger added a commit that referenced this pull request Apr 27, 2026
### Added

- add flint setup preflight migrations
([#233](#233))
- support managed linter configs and aqua-backed tool keys
([#228](#228))
- switch xmloxide to github backend
([#229](#229))
- add taplo formatter check
([#224](#224))
- *(init)* configure line length during init
([#218](#218))

### Fixed

- support renovate v43.136.3
([#223](#223))
- switch yaml-lint to ryl
([#226](#226))
- *(ruff)* install via github releases
([#227](#227))
- resolve init rollout regressions
([#220](#220))

### Other

- reduce fake-bin fixture coverage
([#240](#240))
- *(deps)* update dependency npm:renovate to v43.141.1
([#221](#221))
- guard fixture case groups
([#238](#238))
- *(deps)* update dependency grafana/flint to v0.20.4
([#235](#235))
- *(deps)* lock file maintenance
([#237](#237))
- *(deps)* update dependency mise to v2026.4.19
([#236](#236))
- *(deps)* update rust crate json5 to v1
([#232](#232))
- *(deps)* update taiki-e/install-action digest to 787505c
([#219](#219))
- *(deps)* update dependency grafana/flint to v0.20.3
([#225](#225))

> [!IMPORTANT]
> Close and reopen this PR to trigger CI checks.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <[email protected]>
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.

3 participants