From b0ae69948703ae54b1e59050609603e3f84554f1 Mon Sep 17 00:00:00 2001 From: Yongmin Hong Date: Sun, 9 Jun 2024 21:10:01 +0900 Subject: [PATCH] gitattributes/arclint: add Summary: Mostly from rWEBXYZ. Added to `.gitconfig` via `core.attributesFile`. Also: add some arclint Signed-off-by: Yongmin Hong Test Plan: Not really. Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D224 --- .arclint | 36 ++++++++++++++++++++++++++++++++---- default.gitattributes | 26 ++++++++++++++++++++++++++ default.gitconfig | 1 + 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 default.gitattributes diff --git a/.arclint b/.arclint index 4a9c614..3c8c5c6 100644 --- a/.arclint +++ b/.arclint @@ -1,18 +1,29 @@ { "exclude": [ - "(^.gitignore$)", "(^package-lock.json$)" ], "linters": { "chmod": { "type": "chmod" }, + "Generated": { + "type": "generated" + }, + "jshint": { + "type": "jshint", + "include": [ + "(\\.cjs$)", + "(\\.js$)", + "(\\.jsx$)", + "(\\.mjs$)" + ] + }, "json": { "type": "json", "include": [ - "(^\\.arcconfig$)", - "(^\\.arclint$)", - "(^\\.arcunit$)", + "(^.arcconfig$)", + "(^.arclint$)", + "(^.arcunit$)", "(\\.json$)" ] }, @@ -27,6 +38,10 @@ }, "text": { "type": "text", + "exclude": [ + "(^.gitignore$)", + "(\\.md$)" + ], "text.max-line-length": 80, "severity": { "1": "autofix", @@ -34,6 +49,19 @@ "3": "advice", "5": "disabled" } + }, + "text-markdown": { + "type": "text", + "include": [ + "(^.gitignore$)", + "(\\.md$)" + ], + "severity": { + "1": "autofix", + "2": "advice", + "3": "disabled", + "5": "disabled" + } } } } diff --git a/default.gitattributes b/default.gitattributes new file mode 100644 index 0000000..25bc0de --- /dev/null +++ b/default.gitattributes @@ -0,0 +1,26 @@ +* text=auto +*.sh text=auto + +*.asc binary +*.gif binary +*.jpg binary +*.jpeg binary +*.mp3 binary +*.mp4 binary +*.png binary +*.webm binary +*.webp binary +*.woff2 binary + +*.css diff=css +*.go diff=golang +*.html diff=html +*.java diff=java +*.kt diff=kotlin +*.md diff=markdown +*.mdx diff=markdown +*.php diff=php +*.py diff=python +*.rb diff=ruby +*.rs diff=rust +*.sh diff=bash diff --git a/default.gitconfig b/default.gitconfig index 252b1e6..7cbe582 100644 --- a/default.gitconfig +++ b/default.gitconfig @@ -7,6 +7,7 @@ [commit] gpgSign = true [core] + attributesFile = ~/.gitattributes editor = nano quotepath = false [credential]