From 77cdcac231e13abec1ffabb0c93b6de8a9387d34 Mon Sep 17 00:00:00 2001 From: Cam Jackson <1930451+camjackson@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:00:44 +1100 Subject: [PATCH] =?UTF-8?q?docs(betterer=20=F0=9F=93=9A):=20suggest=20a=20?= =?UTF-8?q?post-rewrite=20hook=20in=20the=20workflow=20docs=20(#1184)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/docs/workflow.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/workflow.md b/website/docs/workflow.md index 0d5889112..a72e5d575 100644 --- a/website/docs/workflow.md +++ b/website/docs/workflow.md @@ -10,6 +10,8 @@ There is not a perfect "one-size-fits-all" workflow for all teams, but here's a - You should run **Betterer** in Pre-commit mode ([`betterer precommit`](./running-betterer#pre-commit-mode)) as a pre-commit hook - perhaps using [husky](https://typicode.github.io/husky) and [lint-staged](https://github.com/okonet/lint-staged). + - Pre-commit mode can also be useful as a post-rewrite hook to detect drift in the results file after a rebase. + - You should run **Betterer** as part of a build pipeline along with other static analysis tools and tests. - You should run **Betterer** in CI mode ([`betterer ci`](./running-betterer#ci-mode-run-your-tests-and-throw-on-changes)) when running on a build server. When **Betterer** runs in CI mode, it will throw an error when the tests results do not exactly match whatever is in the results file. This ensures that the [results file](./results-file) accurately reflects the state of the codebase.