-
Notifications
You must be signed in to change notification settings - Fork 362
Add an .editorconfig file #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1461 +/- ##
=======================================
Coverage 65.56% 65.56%
=======================================
Files 50 50
Lines 8910 8910
Branches 1042 1042
=======================================
Hits 5842 5842
Misses 3068 3068
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I would rather prefer 4 space indentation in c files. @fwsmit would that be okay? |
I don't have a problem with that. It's only that if you change it you will polute the git blame history with indent changes everywhere. So I would suggest leaving it. Any code that is indented so many times as to become an issue with 8 space indent should probably be rewritten anyways to have better code structure |
I am inclined to agree. Ideally the indentation should be adjusted on future changes to those files as to prevent git history pollution. I am not sure its possible with an automated tool however |
For this (and C files) clang-format is the tool of choice. Although it needs a bunch of configuration, as it will reformat the whole code (where do braces go, case statement indented, max line length, etc.)
ah ok, I'll update the PR to remove the 4 -> 8 indention changes the 3 or 4 c files, so that my indentation commit only affects files with mixed spaces. |
Remove trailing whitespaces, except for the generated wayland code.
dunst has a mix of indentation styles. Try to improve it by making it consistent in files with mixed tab/space indentation styles. While this also changes the generated manpages slightly, it makes it more consistent accross the man page and probably won't be noticed by the reader.
Add an .editorconfig file to automatically configure supported editors. This file was generated merely based on the existent styles and the warnings caused while checking the code with the editorconfig-checker tool. As the editorconfig checker tool generates false positives when an indentation is adjusted to match multiline arguments or similar aesthetic adaptions, the corresponding check was disabled. This will miss wrong indentation sizes (e.g. 4 instead of 8 spaces).
updated the PR to just reformat files with mixed spaces |
this looks good. probably the way to go is to transition slowly to 4 spaces everywhere by removing the exceptions one by one going forward |
Whats the plan to continue on this? I could also remove all whitespace fixups, as these are not checked by the editorconfig-checker (because enabling the check would cause false positives for all aligned indents in the C code). |
For now I would prefer starting with this one. For autoformat we'll decide what to do then |
Add an
.editorconfig
mostly trying to match the current styles used in the repository. Consistently indented inconsistent files and moved relevant source files to use spaces instead of tabs. Added necessary checking to the CI usingeditorconfig-checker
. As it doesn't support "fancy indentations" (e.g. align arguments), the indentation check was disabled.Fixes #1455