Skip to content

Conversation

@jbampton
Copy link
Member

Description

This PR adds a simple EditorConfig file. I used only three settings to start with.

Lots of great projects already use EditorConfig:

https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig

And you can see how Apache Airflow does it:

https://github.com/apache/airflow/blob/main/.editorconfig

From the official site:

"EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems."

https://editorconfig.org/

A lot of editors already come bundled with support: https://editorconfig.org/#pre-installed

Some editors require you to download a plugin: https://editorconfig.org/#download

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@DaanHoogland
Copy link
Contributor

@jbampton I like the idea but would like to not enforce people installing something. I think style would be best set in a pre-commit hook. is that possible with this tool?

@DaanHoogland
Copy link
Contributor

also, (i had a look at some examples) your config is not tuned to the project yet. some file types are more equal than others.

@DaanHoogland DaanHoogland added this to the 4.19.0.0 milestone Jun 22, 2023
@jbampton jbampton marked this pull request as draft August 12, 2023 20:48
@DaanHoogland
Copy link
Contributor

let's move to 4.20

@sureshanaparti
Copy link
Contributor

@blueorangutan package

Copy link
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 basic .editorconfig to enforce consistent file encoding, line endings, and final newline.

  • Introduces a root-level EditorConfig file with license header
  • Defines default charset, end_of_line, and insert_final_newline settings
  • Includes commented examples for indent and line length options

@DaanHoogland
Copy link
Contributor

@jbampton , is this still relevant?

@jbampton
Copy link
Member Author

We should use an EditorConfig file. A lot of top projects use it:

https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig

I am not sure if we are ready to set the config and apply it to all files etc. It could possibly cause formatting changes to be mixed up with features in other peoples PRs since IDEs normally just auto format files based on the EditorConfig settings.

Normally we need to also set the indent_style and indent_size for all files overall or for each type. I think some of the Python code is currently using mixed indentation last I checked.

I have some other PRs in play and I was working on code standardization with pre-commit.

We have some other issues as seen in #12246

@DaanHoogland DaanHoogland changed the base branch from main to 4.22 December 12, 2025 12:19
@DaanHoogland
Copy link
Contributor

@jbampton I don’t mind this. Does it need more work?

cc @vishesh92 @sureshanaparti et al.

jbampton and others added 2 commits December 19, 2025 02:27
Co-authored-by: dahn <daan.hoogland@gmail.com>
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.58%. Comparing base (8936e4c) to head (b567165).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.22    #7562   +/-   ##
=========================================
  Coverage     17.58%   17.58%           
- Complexity    15580    15582    +2     
=========================================
  Files          5910     5910           
  Lines        529439   529439           
  Branches      64691    64691           
=========================================
+ Hits          93093    93116   +23     
+ Misses       425861   425837   -24     
- Partials      10485    10486    +1     
Flag Coverage Δ
uitests 3.57% <ø> (ø)
unittests 18.65% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

6 participants