From 0fd4c699ddb2063a58584ac737475d44c0d16711 Mon Sep 17 00:00:00 2001 From: Subhomoy Haldar Date: Mon, 7 Mar 2022 21:45:18 +0530 Subject: [PATCH] tools: modify .gitattributes to categorize *.vsh and v.mod files properly (#13674) --- .gitattributes | 2 ++ cmd/tools/vcreate.v | 2 ++ cmd/tools/vcreate_test.v | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 11510b0cbc..8e3eaf78ed 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,7 @@ *.v linguist-language=V text=auto eol=lf *.vv linguist-language=V text=auto eol=lf +*.vsh linguist-language=V text=auto eol=lf +**/v.mod linguist-language=V text=auto eol=lf *.bat text=auto eol=crlf Dockerfile.* linguist-language=Dockerfile *.toml text eol=lf diff --git a/cmd/tools/vcreate.v b/cmd/tools/vcreate.v index 5e494d8960..65e85740af 100644 --- a/cmd/tools/vcreate.v +++ b/cmd/tools/vcreate.v @@ -77,6 +77,8 @@ vls.log fn gitattributes_content() string { return '*.v linguist-language=V text=auto eol=lf *.vv linguist-language=V text=auto eol=lf +*.vsh linguist-language=V text=auto eol=lf +**/v.mod linguist-language=V text=auto eol=lf ' } diff --git a/cmd/tools/vcreate_test.v b/cmd/tools/vcreate_test.v index fc746aee55..3d07f4773a 100644 --- a/cmd/tools/vcreate_test.v +++ b/cmd/tools/vcreate_test.v @@ -40,6 +40,8 @@ fn init_and_check() ? { assert os.read_file('.gitattributes') ? == [ '*.v linguist-language=V text=auto eol=lf', '*.vv linguist-language=V text=auto eol=lf', + '*.vsh linguist-language=V text=auto eol=lf', + '**/v.mod linguist-language=V text=auto eol=lf', '', ].join_lines()