The indentation of matadata.xml is different in https://wiki.gentoo.org/wiki/GLEP:68 and https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/ the first uses TAB the second spaces. app-vim/gentoo-syntax uses \t I suggest to define what the requirements for a proper indentation are. Is it any combination of space and \t, as long it is valid .xml, or must it be a \t, or ... The grep line is a bit too simple, but gives an idea of the current situation /usr/portage$ grep -e "^ " *-*/*/metadata.xml | wc -l 61311 /usr/portage$ grep -Pe "^\t" *-*/*/metadata.xml | wc -l 85194 Reproducible: Always
IMHO indentation should be two spaces, and tabs should be forbidden. This is the default of Emacs' XML mode, and is also what is used elsewhere in Gentoo documentation, e.g. in the devmanual source: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/xml/htdocs/doc/en/xml-guide.xml?revision=1.72&view=markup#l1107 However, whenever the topic came up in the mailing lists there never was any agreement. Presumably, we could settle on something like the following minimal set of rules: - The file must be valid XML. - Indentation should be consistent, i.e. either spaces or tabs, but not both. - Keep the existing style when touching another dev's file.
Coacher sent me a pointer to https://archives.gentoo.org/gentoo-dev/message/9e1aafedf11149da577a95840d5322db? now, which was an interesting discussion about the same topic in 2015.
(In reply to Ulrich Müller from comment #1) > Presumably, we could settle on something like the following minimal set of > rules: > - The file must be valid XML. > - Indentation should be consistent, i.e. either spaces or tabs, but not both. > - Keep the existing style when touching another dev's file. I agree with this, and doubt it would ever be possible to get consensus on much more than that.
(In reply to Ulrich Müller from comment #1) > IMHO indentation should be two spaces, and tabs should be forbidden. This is > the default of Emacs' XML mode, and is also what is used elsewhere in Gentoo > documentation, e.g. in the devmanual source: > https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/xml/htdocs/doc/en/xml- > guide.xml?revision=1.72&view=markup#l1107 > > However, whenever the topic came up in the mailing lists there never was any > agreement. > > Presumably, we could settle on something like the following minimal set of > rules: > - The file must be valid XML. > - Indentation should be consistent, i.e. either spaces or tabs, but not both. > - Keep the existing style when touching another dev's file. I agree with the above. The GLEP example uses tab but it's not specified as part of the GLEP. I used spaces in devmanual to have a more compact layout.
(In reply to Ulrich Müller from comment #1) > Presumably, we could settle on something like the following minimal set of > rules: > - The file must be valid XML. > - Indentation should be consistent, i.e. either spaces or tabs, but not both. > - Keep the existing style when touching another dev's file. Excellent approach, +1 from me.
fixed in https://github.com/gentoo/devmanual.gentoo.org/commit/49fb72be41dc38a280c3da6a259dd229b85baf59 and visible on the webpage