diff --git a/.gitattributes b/.gitattributes index f099faa4..f42d752c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,14 @@ -*.bash text eol=lf whitespace=blank-at-eol,space-before-tab,tab-in-indent,trailing-space,tabwidth=4 -*.sh text eol=lf whitespace=blank-at-eol,space-before-tab,tab-in-indent,trailing-space,tabwidth=4 +# shell scripts should not use tabs to indent! +*.bash text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 +*.sh text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 -# files for systemd -*.path text eol=lf whitespace=blank-at-eol,space-before-tab,tab-in-indent,trailing-space,tabwidth=4 -*.service text eol=lf whitespace=blank-at-eol,space-before-tab,tab-in-indent,trailing-space,tabwidth=4 -*.timer text eol=lf whitespace=blank-at-eol,space-before-tab,tab-in-indent,trailing-space,tabwidth=4 +# files for systemd (shell-similar) +*.path text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 +*.service text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 +*.timer text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 + +# go fmt will enforce this, but in case a user has not called "go fmt" allow GIT to catch this: +*.go text eol=lf core.whitespace whitespace=indent-with-non-tab,trailing-space,tabwidth=4 + +*.yml text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2 +.git* text eol=auto core.whitespace whitespace=trailing-space