Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# EditorConfig — Phenotype org canonical
# https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{rs,toml,py,go,md,yaml,yml,json,html,css,scss}]
indent_size = 4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant indent_size section duplicates wildcard default

Low Severity

The [*.{rs,toml,py,go,md,yaml,yml,json,html,css,scss}] section sets indent_size = 4, which is already the default from the [*] section. This is fully redundant — removing it changes nothing. For a "canonical template" intended for broad adoption, redundant rules add maintenance burden and risk diverging from the wildcard default if one is updated without the other.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ea36390. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Go files get space indentation conflicting with gofmt

Medium Severity

The extension list on this line explicitly includes go, but only overrides indent_size. Go files still inherit indent_style = space from the [*] section. Go's universal formatter gofmt mandates tabs for indentation. For any Go project adopting this canonical template, editors would insert spaces while gofmt rewrites to tabs, causing constant formatting churn. A [*.go] section with indent_style = tab is likely needed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ea36390. Configure here.


[*.{ts,tsx,js,jsx,mjs,cjs}]
indent_size = 2

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false # trailing spaces = line break in Markdown

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The Markdown override uses an inline comment on the same line as trim_trailing_whitespace, but EditorConfig does not support inline comments for property values. Many parsers will treat the whole right-hand side as an invalid value, so the override may be ignored and Markdown trailing spaces may still be trimmed (breaking intended hard line breaks). Move the comment to its own preceding line. [logic error]

Severity Level: Major ⚠️
- ❌ Markdown hard line breaks lost when saving via EditorConfig.
- ⚠️ Documentation layout subtly degraded across edited Markdown files.
Steps of Reproduction ✅
1. Open the repository in an editor with EditorConfig support (e.g., VS Code with
EditorConfig extension) so that `.editorconfig` at
`/workspace/phenotype-tooling/.editorconfig:1-23` is applied.

2. Note the global rule in `.editorconfig` line 11: `trim_trailing_whitespace = true`
under the `[*]` section, which applies to all files by default.

3. Examine the Markdown override at `.editorconfig:22-23`, specifically line 23:
`trim_trailing_whitespace = false # trailing spaces = line break in Markdown`; according
to the EditorConfig specification, comments must occupy whole lines, so `# trailing spaces
= ...` is not a valid inline comment and becomes part of the value.

4. Create or edit a Markdown file (e.g., `docs/example.md`) that uses two trailing spaces
at the end of a line for a hard line break, then save it; because the value on line 23 is
invalid, many EditorConfig parsers will ignore this override and keep applying the global
`trim_trailing_whitespace = true` from line 11, causing the trailing spaces in the
Markdown file to be removed on save and breaking the intended hard line breaks.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** .editorconfig
**Line:** 23:23
**Comment:**
	*Logic Error: The Markdown override uses an inline comment on the same line as `trim_trailing_whitespace`, but EditorConfig does not support inline comments for property values. Many parsers will treat the whole right-hand side as an invalid value, so the override may be ignored and Markdown trailing spaces may still be trimmed (breaking intended hard line breaks). Move the comment to its own preceding line.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎