Uh oh!
There was an error while loading. Please reload this page.
chore: add .editorconfig to all templates - #155
Conversation
No template shipped one, so a scaffolded project relied on whatever each contributor's editor happened to default to for indentation, line endings and charset. Each template gets an .editorconfig following this repo's own root file rather than a generic snippet, so a scaffolded project and cpa-templates itself agree: utf-8, lf, final newline, trim trailing whitespace, 4-space indent, 2 for yml/yaml/toml/md/json, and tab for Makefile in uv-workspace-starter (the only template that has one). Two additions beyond a straight copy. Each file sets max_line_length for *.py to that template's own [tool.ruff] line-length — 100 everywhere except uv-workspace-starter at 88 — so the editor's ruler agrees with the formatter that will reflow the file. And trim_trailing_whitespace is turned back off for Markdown, where two trailing spaces are a hard line break and stripping them silently changes rendering; every template ships 9-12 .md files. Resolution verified for .py, .toml, .md, .yaml and Makefile paths in each template with the reference editorconfig parser. ClosesCreate-Python-App#152
Warning Review limit reached
Next review available in:57 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes#152. One PR covering all six templates.
Based on this repo's own file, not a generic snippet
cpa-templatesalready has a root.editorconfig, and it differs slightly from the one sketched in the issue (it also coversmd, and adds aMakefilerule). Scaffolded projects and this repo agreeing seemed more useful than either, so each template's file follows the root one:[Makefile] indent_style = tabis included only inuv-workspace-starter, the one template that actually ships a Makefile — a rule matching nothing is just noise in the other five.Two additions worth flagging
max_line_lengthper template. Each file sets it for*.pyfrom that template's own[tool.ruff] line-length:100everywhere exceptuv-workspace-starter, which is88. Without it the editor draws its ruler at 80 while ruff reflows at 100, which is the exact confusion.editorconfigexists to prevent.trim_trailing_whitespace = falsefor Markdown. Two trailing spaces are a hard line break in Markdown, so globally trimming them silently changes rendering. Every template ships 9–12.mdfiles, so this would have bitten.Verified
Resolution checked with the reference
editorconfigparser, not by eye — real paths in real templates:uv-workspace-starter/app/main.pymax_line_length88celery-worker/worker/tasks.pymax_line_length100celery-worker/pyproject.tomlindent_size2celery-worker/README.mdtrim_trailing_whitespacefalseuv-workspace-starter/Makefileindent_styletabmlops-sklearn-starter/config.yamlindent_size2All files are LF with a trailing newline.
python scripts/ci/validate-registry.pypasses:✅ registry ok (6 templates, 18 extensions).I also checked the declared widths against the existing code so the config isn't stating something the templates violate: every template's
.pyfiles are within their declared width, with one pre-existing exception —fastapi-starter/app/core/exception_handlers.py:60is 107 chars, and the overflow is a trailing# type: ignore[arg-type].max_line_lengthis a ruler rather than an enforcement, so nothing breaks; noting it in case you'd rather that line were wrapped.