mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-06 20:13:43 +09:00
An ~80-column wrap is correct in Go comments and commit bodies, where coding agents spend most of their time, and the reflex leaks from there into markdown files and GitHub bodies. A documented rule alone does not survive that reflex, so check it mechanically at the moment of writing. The hook refuses a Write/Edit/MultiEdit that would add a hardwrapped paragraph, list item or blockquote to a markdown file, and a gh command that would publish one to GitHub via --body, --body-file, a heredoc, or an api body field. Judging what an edit ADDS is the whole difficulty. Comparing the text of each wrapped block refuses a typo fix inside a paragraph that was already wrapped; counting the blocks lets a file be rewritten as entirely fresh hardwrapped prose so long as the total does not rise. So the hook asks about the break rather than the block: a soft break is the edit's doing only when both lines it joins are lines the edit wrote. Whatever it cannot read with certainty, it allows -- a body the shell assembles at runtime, an unsplittable command line, a path that is not a regular file, a --body-file the same command has yet to write. A guard that blocks legitimate work gets switched off, and then it guards nothing. Vendored charts, published changelogs and Go templates are out of scope entirely, so hack/upload-releasenotes.sh keeps publishing its historical release notes. Line breaks are only rejected inside prose. Code blocks, tables, HTML, front matter, link reference definitions, footnotes, badge stacks and explicit hard breaks -- two trailing spaces or a trailing backslash, which render as <br> -- keep their breaks, because reflowing those would change the rendered output. A heredoc is attributed to the command that opened it, so a YAML manifest piped to kubectl is not read as a PR body. The hook and its registration are tracked by name so contributors get them on clone, while personal agent state stays ignored; personal overrides belong in .claude/settings.local.json. hack/md-no-hardwrap.bats covers both surfaces with 60 cases and make unit-tests picks it up automatically. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
107 lines
2.4 KiB
Plaintext
107 lines
2.4 KiB
Plaintext
_out
|
|
_repos
|
|
.git
|
|
.idea
|
|
.vscode
|
|
|
|
# User-specific stuff
|
|
.idea/**/workspace.xml
|
|
.idea/**/tasks.xml
|
|
.idea/**/usage.statistics.xml
|
|
.idea/**/dictionaries
|
|
.idea/**/shelf
|
|
|
|
# AWS User-specific
|
|
.idea/**/aws.xml
|
|
|
|
# Generated files
|
|
.idea/**/contentModel.xml
|
|
|
|
# Sensitive or high-churn files
|
|
.idea/**/dataSources/
|
|
.idea/**/dataSources.ids
|
|
.idea/**/dataSources.local.xml
|
|
.idea/**/sqlDataSources.xml
|
|
.idea/**/dynamic.xml
|
|
.idea/**/uiDesigner.xml
|
|
.idea/**/dbnavigator.xml
|
|
|
|
# Gradle
|
|
.idea/**/gradle.xml
|
|
.idea/**/libraries
|
|
|
|
# Gradle and Maven with auto-import
|
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
# since they will be recreated, and may cause churn. Uncomment if using
|
|
# auto-import.
|
|
# .idea/artifacts
|
|
# .idea/compiler.xml
|
|
# .idea/jarRepositories.xml
|
|
# .idea/modules.xml
|
|
# .idea/*.iml
|
|
# .idea/modules
|
|
# *.iml
|
|
# *.ipr
|
|
|
|
# CMake
|
|
cmake-build-*/
|
|
|
|
# Mongo Explorer plugin
|
|
.idea/**/mongoSettings.xml
|
|
|
|
# File-based project format
|
|
*.iws
|
|
|
|
# IntelliJ
|
|
out/
|
|
|
|
# mpeltonen/sbt-idea plugin
|
|
.idea_modules/
|
|
|
|
# JIRA plugin
|
|
atlassian-ide-plugin.xml
|
|
|
|
# Cursive Clojure plugin
|
|
.idea/replstate.xml
|
|
|
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
com_crashlytics_export_strings.xml
|
|
crashlytics.properties
|
|
crashlytics-build.properties
|
|
fabric.properties
|
|
|
|
# Editor-based Rest Client
|
|
.idea/httpRequests
|
|
|
|
# Android studio 3.1+ serialized cache file
|
|
.idea/caches/build_file_checksums.ser
|
|
|
|
.DS_Store
|
|
**/.DS_Store
|
|
|
|
tmp/
|
|
|
|
# build revision marker (generated by make image-packages)
|
|
packages/core/platform/.build-revision
|
|
|
|
# Agent tooling. The md-no-hardwrap hook and its registration are shared with
|
|
# every contributor, so they are tracked by name; personal agent state (local
|
|
# settings overrides, worktrees, session data) stays out of git. Put personal
|
|
# overrides in .claude/settings.local.json -- .claude/settings.json is tracked
|
|
# and git will overwrite it on pull.
|
|
.claude/*
|
|
!.claude/hooks/
|
|
.claude/hooks/*
|
|
!.claude/hooks/md-no-hardwrap.py
|
|
!.claude/settings.json
|
|
|
|
# Credentials and runtime state minted by the backup/restore demo scripts
|
|
# under examples/backups/*/. Files are written by 00-helpers.sh +
|
|
# 02-create-bucket.sh + 04-create-backupjob.sh; cleanup.sh deletes them
|
|
# on teardown. Keep them out of git so a tenant who runs the demo and
|
|
# then `git add .` does not accidentally commit S3 keys.
|
|
examples/backups/*/.bucket-info.env
|
|
examples/backups/*/.sentinel.env
|
|
examples/backups/*/.backup-name.env
|
|
packages/core/platform/images/migrations/etcd-operator-crds/
|