The documentation for editorconfig files says that setting indent_size
changes the default value of tab_width; but the documentation is a
little ambiguous as to what happens if the two values are set via
different match rules. I'd generally expect in this case that the
defaulting behavior would only kick in if there were no setting of
tab_width at all, but it seems that the go implementation (or at least
the way forgejo uses the go implementation) does not do this.
However, it is fairly easy to make this all explicit by explicitly
setting tab_width whenever we have an indent_size that is not 8. I've
deliberately omitted overriding this when the indent style is set to
space, since this should make the presence of a hard tab show up in
the forge UI more clearly as incorrect indentation.
/ChangeLog:
* .editorconfig: Explicitly set tab_width whenever a
config rule has indent_style = tab and indent_size != 8.
Both GCC and GDB/binutils now have root editorconfig files. It would
make sense to unify them as this sets the general tone for these
projects.
ChangeLog:
* .editorconfig: Unify the GCC and GDB/binutils root config.
This config file sets default formatting behaviour for a large number
of common editors, see https://editorconfig.org
It also ensures that https://forge.sourceware.org formats GCC code
correctly, because it defaults to tab_width=4 but will respect a
.editorconfig file if present in the repo.
ChangeLog:
* .editorconfig: New file.