Commit Graph

4 Commits

Author SHA1 Message Date
Richard Earnshaw 162ec539a3 editorconfig: Add explicit tab_width when indent_size != 8
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.
2025-10-28 15:06:51 +00:00
Richard Earnshaw 39b810b095 toplevel: unify the GCC and GDB/binutils .editorconfig files
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.
2025-10-01 15:42:59 +01:00
Richard Earnshaw b8701893e9 toplevel: Fix syntax issue in .editorconfig
.editorconfig entries need to be a single filesystem glob pattern.

ChangeLog:

	* .editorconfig: Fix glob patterns.
2025-09-23 13:17:01 +01:00
Jonathan Wakely 67d7046067
top-level: Add .editorconfig file
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.
2025-09-22 18:19:26 +01:00