gitalias: add more rules
Summary: - add !command in correct sections to prevent mistakes - alphabetize - `diffs` for `diff --staged` - `prod` to quick deploy to `prod` branch for some repos. - `staash` for `stash -a` also: - add `max_line_length: 80` to editorconfig - autofix `TXT1` rule for `.arclint` - `rerere.autoUpdate = tru` for `gitconfig` - add prettier - fix nfty.yml - add `.yamllint` config Signed-off-by: Yongmin Hong <revi@omglol.email> Test Plan: I think there isn't? Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D211
This commit is contained in:
parent
da1e5b8acb
commit
d5b6e05a86
8 changed files with 90 additions and 17 deletions
2
.arclint
2
.arclint
|
@ -29,7 +29,7 @@
|
|||
"type": "text",
|
||||
"text.max-line-length": 80,
|
||||
"severity": {
|
||||
"1": "advice",
|
||||
"1": "autofix",
|
||||
"2": "advice",
|
||||
"3": "advice",
|
||||
"5": "disabled"
|
||||
|
|
|
@ -4,8 +4,3 @@ backends:
|
|||
- matrix
|
||||
pushover:
|
||||
user_key: [REDACTED]
|
||||
matrix:
|
||||
url: "https://matrix.revi.xyz"
|
||||
roomId: "#devops:revi.xyz"
|
||||
userId: "REDACTED"
|
||||
password: "REDACTED"
|
|
@ -10,4 +10,5 @@ end_of_line = lf
|
|||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
trim_trailing_whitespace = true
|
||||
|
|
34
.gitaliases
34
.gitaliases
|
@ -2,26 +2,36 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
[alias]
|
||||
# some project uses `master` and some uses `main` for the default.
|
||||
# since their first two letters are both ma, use the last char.
|
||||
acm = commit -a -s
|
||||
# since their first two letters are both ma, use the last char
|
||||
# which is either `r` for master or `n` for main.
|
||||
# a-d
|
||||
# a-l
|
||||
# a-p
|
||||
# a-w
|
||||
aal = add *
|
||||
acm = commit -a -s
|
||||
amend = commit --amend
|
||||
amendss = commit --amend -S -s
|
||||
amends = commit --amend -s
|
||||
amendss = commit --amend -S -s
|
||||
# arcd
|
||||
# arcl
|
||||
# arcp
|
||||
# arcw
|
||||
br = branch -v
|
||||
brd = branch -d
|
||||
brD = branch -D
|
||||
cob = checkout -b
|
||||
cm = commit -s
|
||||
cmt = commit -S -s
|
||||
co = checkout
|
||||
cob = checkout -b
|
||||
com = !echo 'ERROR: use cor for master, and con for main.'
|
||||
comn = checkout main
|
||||
comr = checkout master
|
||||
cm = commit -s
|
||||
cmt = commit -S -s
|
||||
count = count-objects -vH
|
||||
diffs = diff --staged
|
||||
fa = fetch --all
|
||||
fup = fetch upstream
|
||||
fo = fetch origin
|
||||
fup = fetch upstream
|
||||
graph = log --pretty=format:\"%h %s\" --graph
|
||||
osync = !echo 'ERROR: use osyncr for master, and osyncm for main.'
|
||||
osyncn = rebase origin/main
|
||||
|
@ -29,17 +39,19 @@
|
|||
po= !echo 'ERROR: use por for master, and pon for main.'
|
||||
pon = push origin main
|
||||
por = push origin master
|
||||
prod = !git checkout prod && git rebase origin/master && git push origin prod && git checkout master
|
||||
st = status
|
||||
staash = stash -a
|
||||
usync = !echo 'ERROR: use usyncr for master, and usyncn for main.'
|
||||
usyncn = rebase upstream/main
|
||||
usyncr = rebase upstream/master
|
||||
# below are non-git command, signified via `!` in the comment
|
||||
# https://issuetracker.revi.xyz/u/gitalias
|
||||
arcd = !arc diff
|
||||
a-d = !arc diff
|
||||
arcl = !arc land
|
||||
arcd = !arc diff
|
||||
a-l = !arc land
|
||||
arcp = !arc patch
|
||||
arcl = !arc land
|
||||
a-p = !arc patch
|
||||
arcw = !arc work
|
||||
arcp = !arc patch
|
||||
a-w = !arc work
|
||||
arcw = !arc work
|
||||
|
|
36
.yamllint
Normal file
36
.yamllint
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
|
||||
yaml-files:
|
||||
- '*.yaml'
|
||||
- '*.yml'
|
||||
- '.yamllint'
|
||||
|
||||
rules:
|
||||
anchors: enable
|
||||
braces: enable
|
||||
brackets: enable
|
||||
colons: enable
|
||||
commas: enable
|
||||
comments:
|
||||
level: warning
|
||||
comments-indentation:
|
||||
level: warning
|
||||
document-end: disable
|
||||
document-start: disable
|
||||
empty-lines: enable
|
||||
empty-values: disable
|
||||
float-values: disable
|
||||
hyphens: enable
|
||||
indentation: enable
|
||||
key-duplicates: enable
|
||||
key-ordering: disable
|
||||
line-length:
|
||||
level: warning
|
||||
new-line-at-end-of-file:
|
||||
level: warning
|
||||
new-lines: enable
|
||||
octal-values: disable
|
||||
quoted-strings: disable
|
||||
trailing-spaces: enable
|
||||
truthy:
|
||||
level: warning
|
|
@ -30,6 +30,7 @@
|
|||
show = fuller
|
||||
[rerere]
|
||||
enabled = true
|
||||
autoUpdate = true
|
||||
[sendemail]
|
||||
from = 'Yongmin Hong <revi@omglol.email>'
|
||||
smtpserver = smtp.fastmail.com
|
||||
|
|
25
package-lock.json
generated
25
package-lock.json
generated
|
@ -6,6 +6,9 @@
|
|||
"": {
|
||||
"dependencies": {
|
||||
"jsonlint": "^1.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
|
@ -70,6 +73,22 @@
|
|||
"underscore": "~1.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz",
|
||||
"integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
|
||||
|
@ -131,6 +150,12 @@
|
|||
"underscore": "~1.6.0"
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz",
|
||||
"integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==",
|
||||
"dev": true
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"jsonlint": "^1.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.3.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue