Skip to content

add editorconfig#62

Open
kpj2006 wants to merge 1 commit intoAOSSIE-Org:mainfrom
kpj2006:Editorconfig
Open

add editorconfig#62
kpj2006 wants to merge 1 commit intoAOSSIE-Org:mainfrom
kpj2006:Editorconfig

Conversation

@kpj2006
Copy link
Contributor

@kpj2006 kpj2006 commented Feb 15, 2026

Addressed Issues:

Screenshots/Recordings:

Additional Notes:

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

Summary by CodeRabbit

  • Chores
    • Added editor configuration standards to enforce consistent code formatting across the project for improved code maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 2026

Walkthrough

A new EditorConfig file is introduced to establish universal and file-type-specific coding standards across the repository, including character encoding, line endings, indentation, and whitespace trimming rules for multiple file types.

Changes

Cohort / File(s) Summary
EditorConfig Configuration
.editorconfig
Adds universal formatting rules (UTF-8, LF, 2-space indentation, trim whitespace, final newline) with file-type-specific settings for Markdown, YAML, JSON, JavaScript/TypeScript, Python, Java, C/C++, shell scripts, Makefiles, config files, XML/HTML, CSS/SCSS/LESS, and package manager files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

Linter

Suggested reviewers

  • Zahnentferner

Poem

🐰 A config file hops along,
With spaces, newlines, all so strong,
UTF-8 and LF's gleam,
Consistency is now our dream! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (3 files):

⚔️ .github/ISSUE_TEMPLATE/bug_report.yml (content)
⚔️ .github/ISSUE_TEMPLATE/feature_request.yml (content)
⚔️ .github/ISSUE_TEMPLATE/good_first_issue.yml (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add editorconfig' clearly and concisely describes the main change: introducing a new EditorConfig file to the repository.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch Editorconfig
  • Post resolved changes as copyable diffs in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.editorconfig:
- Around line 22-86: The .editorconfig contains many per-file sections that
duplicate the universal [*] defaults; remove the entirely redundant sections
([*.{yml,yaml}], [*.json], [*.{js,jsx,ts,tsx}], [*.sh], [*.{toml,ini,cfg}] if
identical, [*.{xml,html,svg}], [*.{css,scss,sass,less}],
[{package.json,package-lock.json}]) and consolidate any needed overrides into
only the sections that differ from the universal [*] settings; for partially
redundant entries (e.g., [*.py], [*.java], [*.{c,cpp,h,hpp}],
[{*.gradle,*.gradle.kts}]) remove the duplicated indent_style or indent_size
lines so each section only contains settings that override the [*] defaults.

Comment on lines +22 to +86
# YAML files
[*.{yml,yaml}]
indent_size = 2
indent_style = space

# JSON files
[*.json]
indent_size = 2
indent_style = space

# JavaScript/TypeScript
[*.{js,jsx,ts,tsx}]
indent_size = 2
indent_style = space

# Python files
[*.py]
indent_size = 4
indent_style = space

# Java files
[*.java]
indent_size = 4
indent_style = space

# C/C++ files
[*.{c,cpp,h,hpp}]
indent_size = 4
indent_style = space

# Shell scripts
[*.sh]
indent_size = 2
indent_style = space

# Makefiles (must use tabs)
[Makefile]
indent_style = tab

[*.mk]
indent_style = tab

# Configuration files
[*.{toml,ini,cfg}]
indent_size = 2
indent_style = space

# XML/HTML files
[*.{xml,html,svg}]
indent_size = 2
indent_style = space

# CSS/SCSS/LESS files
[*.{css,scss,sass,less}]
indent_size = 2
indent_style = space

# Package manager files
[{package.json,package-lock.json}]
indent_size = 2
indent_style = space

[{*.gradle,*.gradle.kts}]
indent_size = 4
indent_style = space
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider removing redundant settings for maintainability.

Several file-type sections repeat settings already defined in the universal [*] section:

  • Entirely redundant sections (both indent_size = 2 and indent_style = space are universal defaults):

    • YAML (lines 22-25)
    • JSON (lines 27-30)
    • JavaScript/TypeScript (lines 32-35)
    • Shell scripts (lines 52-55)
    • Config files (lines 64-67)
    • XML/HTML (lines 69-72)
    • CSS/SCSS/LESS (lines 74-77)
    • Package manager files (lines 79-82)
  • Partially redundant (indent_style = space is already universal):

    • Python (line 40)
    • Java (line 45)
    • C/C++ (line 50)
    • Gradle (line 86)

Removing redundant settings would make the file more maintainable and easier to scan. Only settings that differ from universal defaults need to be specified.

♻️ Streamlined version removing redundancies
-# YAML files
-[*.{yml,yaml}]
-indent_size = 2
-indent_style = space
-
-# JSON files
-[*.json]
-indent_size = 2
-indent_style = space
-
-# JavaScript/TypeScript
-[*.{js,jsx,ts,tsx}]
-indent_size = 2
-indent_style = space
-
 # Python files
 [*.py]
 indent_size = 4
-indent_style = space
 
 # Java files
 [*.java]
 indent_size = 4
-indent_style = space
 
 # C/C++ files
 [*.{c,cpp,h,hpp}]
 indent_size = 4
-indent_style = space
-
-# Shell scripts
-[*.sh]
-indent_size = 2
-indent_style = space
 
 # Makefiles (must use tabs)
 [Makefile]
 indent_style = tab
 
 [*.mk]
 indent_style = tab
-
-# Configuration files
-[*.{toml,ini,cfg}]
-indent_size = 2
-indent_style = space
-
-# XML/HTML files
-[*.{xml,html,svg}]
-indent_size = 2
-indent_style = space
-
-# CSS/SCSS/LESS files
-[*.{css,scss,sass,less}]
-indent_size = 2
-indent_style = space
-
-# Package manager files
-[{package.json,package-lock.json}]
-indent_size = 2
-indent_style = space
 
 [{*.gradle,*.gradle.kts}]
 indent_size = 4
-indent_style = space
🤖 Prompt for AI Agents
In @.editorconfig around lines 22 - 86, The .editorconfig contains many per-file
sections that duplicate the universal [*] defaults; remove the entirely
redundant sections ([*.{yml,yaml}], [*.json], [*.{js,jsx,ts,tsx}], [*.sh],
[*.{toml,ini,cfg}] if identical, [*.{xml,html,svg}], [*.{css,scss,sass,less}],
[{package.json,package-lock.json}]) and consolidate any needed overrides into
only the sections that differ from the universal [*] settings; for partially
redundant entries (e.g., [*.py], [*.java], [*.{c,cpp,h,hpp}],
[{*.gradle,*.gradle.kts}]) remove the duplicated indent_style or indent_size
lines so each section only contains settings that override the [*] defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant