Skip to content

Conversation

@esadek
Copy link
Contributor

@esadek esadek commented Nov 13, 2025

Add a .editorconfig file to maintain consistent coding styles across developers and editors.

@amoeba
Copy link
Member

amoeba commented Nov 13, 2025

Thanks for this. Something along these lines would be good. I have my editor set up to normalize all the things I see in the editorconfig but I can tell @zeroshade uses some other method. What I do now is save without format-on-save. @zeroshade would this work okay for your editor setup?

btw I ran eclint fix on the repo with the above editorconfig and it breaks formatting in ways we don't want. But I think it'd be good to tidy up the repo in this PR if we can. Do you want to see about doing that @esadek and using git ignoreRevsFile?

@esadek
Copy link
Contributor Author

esadek commented Nov 14, 2025

Thank you for checking with eclint. I wasn’t aware of EditorConfig validation tools like this.

I’ve made formatting fixes, added commit hashes to .git-blame-ignore-revs, and rerun editorconfig-checker. The only remaining errors are "Wrong indentation type (spaces instead of tabs)" for bash.go, fish.go, and zsh.go in cmd/dbc/completions/. This is intentional, as space indentation is used inside multiline strings.

trim_trailing_whitespace = true

[*.{go,mod}]
indent_style = tab
Copy link
Member

Choose a reason for hiding this comment

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

why switch to indent_style tab for go instead of leaving it as space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the go files in the repo use tabs for indentation. This also seems to be the standard, as gofmt uses tabs.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, fair enough 😄

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