Code Checks: Difference between revisions
Appearance
mNo edit summary |
|||
| Line 1: | Line 1: | ||
==pre-commit via prek== | |||
replacement for pre-commit | |||
brew install prek | |||
prek run --all-files | |||
# update hook versions | |||
prek autoupdate | |||
# or | |||
pnpm dlx @j178/prek run --all-files | |||
prek.toml | |||
#:schema https://www.schemastore.org/prek.json | |||
exclude = ''' | |||
(?x)^( | |||
\.vscode/.* | |||
)$ | |||
''' | |||
[[repos]] | |||
repo = "builtin" | |||
hooks = [ | |||
{ id = "check-added-large-files", args = [ | |||
"--maxkb=500", | |||
] }, | |||
{ id = "check-case-conflict" }, | |||
{ id = "check-executables-have-shebangs" }, | |||
{ id = "check-illegal-windows-names" }, | |||
{ id = "check-json" }, | |||
{ id = "check-json5" }, | |||
{ id = "check-merge-conflict" }, | |||
{ id = "check-shebang-scripts-are-executable" }, | |||
{ id = "check-symlinks" }, | |||
{ id = "check-toml" }, | |||
{ id = "check-vcs-permalinks" }, | |||
{ id = "check-xml" }, | |||
{ id = "check-yaml" }, | |||
{ id = "destroyed-symlinks" }, | |||
{ id = "detect-private-key" }, | |||
{ id = "end-of-file-fixer" }, | |||
{ id = "file-contents-sorter", files = "^(.gitignore|cspell-words.txt)$", args = [ | |||
"--ignore-case", | |||
] }, | |||
{ id = "fix-byte-order-marker" }, | |||
{ id = "mixed-line-ending", args = [ | |||
"--fix=lf", | |||
] }, | |||
{ id = "requirements-txt-fixer" }, | |||
{ id = "trailing-whitespace" }, | |||
] | |||
==Markdown via rumdl== | ==Markdown via rumdl== | ||
brew install rumdl | brew install rumdl | ||
Revision as of 22:28, 18 August 2026
pre-commit via prek
replacement for pre-commit
brew install prek prek run --all-files # update hook versions prek autoupdate # or pnpm dlx @j178/prek run --all-files
prek.toml
#:schema https://www.schemastore.org/prek.json exclude = (?x)^( \.vscode/.* )$ repos repo = "builtin" hooks = [ { id = "check-added-large-files", args = [ "--maxkb=500", ] }, { id = "check-case-conflict" }, { id = "check-executables-have-shebangs" }, { id = "check-illegal-windows-names" }, { id = "check-json" }, { id = "check-json5" }, { id = "check-merge-conflict" }, { id = "check-shebang-scripts-are-executable" }, { id = "check-symlinks" }, { id = "check-toml" }, { id = "check-vcs-permalinks" }, { id = "check-xml" }, { id = "check-yaml" }, { id = "destroyed-symlinks" }, { id = "detect-private-key" }, { id = "end-of-file-fixer" }, { id = "file-contents-sorter", files = "^(.gitignore|cspell-words.txt)$", args = [ "--ignore-case", ] }, { id = "fix-byte-order-marker" }, { id = "mixed-line-ending", args = [ "--fix=lf", ] }, { id = "requirements-txt-fixer" }, { id = "trailing-whitespace" }, ]
Markdown via rumdl
brew install rumdl rumdl fmt . rumdl check . # or pnpm dlx rumdl@0.2.55 fmt pnpm dlx rumdl@0.2.55 check --fix
.rumdl.toml
[global] disable = ["MD013"] # line-length
YAML via ryl
# via uv
uvx ryl@0.21.0 check -d '{extends: default, rules: {line-length: disable, truthy: disable}, ignore: [pnpm-lock.yaml]}' . --fix
# via npm
npx -y @owenlamont/ryl@0.21.0 check -d '{extends: default, rules: {line-length: disable, truthy: disable}, ignore: [pnpm-lock.yaml]}' .
.ryl.toml
ignore = ["pnpm-lock.yaml"] [rules] # https://ryl-docs.pages.dev/rules/ anchors = "enable" braces = "enable" brackets = "enable" colons = "enable" commas = "enable" document-end = "disable" empty-lines = "enable" empty-values = "disable" float-values = "disable" hyphens = "enable" indentation = "enable" key-duplicates = "enable" key-ordering = "disable" line-length = "disable" new-line-at-end-of-file = "enable" new-lines = "enable" octal-values = "disable" quoted-strings = "disable" trailing-spaces = "enable" [rules.comments] level = "warning" [rules.comments-indentation] level = "warning" [rules.document-start] level = "warning" [rules.truthy] level = "warning"