From a3d710e59cf469ac8eba136d98a6afd15db4e50e Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 13 Mar 2025 16:19:44 -0400 Subject: [PATCH] chore: Always check that git merge conflict markers are not present (#1610) # What does this PR do? Before the change, it was only doing it during the merge. [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan ``` $ git checkout d263edbf90f958349c7b9adea8fd4e5181932a69 $ pre-commit run --all-files check for merge conflicts................................................Failed - hook id: check-merge-conflict - exit code: 1 docs/_static/llama-stack-spec.yaml:3179: Merge conflict string '<<<<<<<' found docs/_static/llama-stack-spec.yaml:3185: Merge conflict string '=======' found docs/_static/llama-stack-spec.yaml:3190: Merge conflict string '>>>>>>>' found [...] ``` [//]: # (## Documentation) Signed-off-by: Ihar Hrachyshka --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 926ae21cc..80a303b09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,6 +8,7 @@ repos: rev: v5.0.0 # Latest stable version hooks: - id: check-merge-conflict + args: ['--assume-in-merge'] - id: trailing-whitespace exclude: '\.py$' # Exclude Python files as Ruff already handles them - id: check-added-large-files