From d5f7f52f2d696f83ba0a8effec0bcfa2e780781e Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Fri, 1 Oct 2021 21:44:24 +0200 Subject: [PATCH 1/3] chore: ci list files that spellcheck finds Avoid -r flag for false positives --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01aed3c06ce3..5ed5ee07d824 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -242,8 +242,9 @@ spellcheck: - cargo spellcheck --version # compare with the commit parent to the PR, given it's from a default branch - git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH} + - cargo spellcheck list-files -vvv $(git diff --name-only --diff-filter=AM --merge-base master HEAD) - time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1 - -r $(git diff --name-only ${CI_COMMIT_SHA} $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) + $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) ${CI_COMMIT_SHA} allow_failure: true build-adder-collator: From 8b92bf9f12b6e486a5b47a6c53fd053fce4bed6b Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Fri, 1 Oct 2021 21:47:01 +0200 Subject: [PATCH 2/3] avoid master --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ed5ee07d824..d384a9dc6e1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -242,7 +242,7 @@ spellcheck: - cargo spellcheck --version # compare with the commit parent to the PR, given it's from a default branch - git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH} - - cargo spellcheck list-files -vvv $(git diff --name-only --diff-filter=AM --merge-base master HEAD) + - cargo spellcheck list-files -vvv $(git diff --name-only --diff-filter=AM --merge-base ${CI_DEFAULT_BRANCH}) - time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1 $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) ${CI_COMMIT_SHA} allow_failure: true From 6dcbee0a4025228712278f8ac7e70703f1d2691b Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Mon, 4 Oct 2021 14:06:11 +0200 Subject: [PATCH 3/3] improve --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d384a9dc6e1f..6a7d381c0722 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -242,9 +242,9 @@ spellcheck: - cargo spellcheck --version # compare with the commit parent to the PR, given it's from a default branch - git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH} - - cargo spellcheck list-files -vvv $(git diff --name-only --diff-filter=AM --merge-base ${CI_DEFAULT_BRANCH}) + - cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) - time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1 - $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) ${CI_COMMIT_SHA} + $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH})) allow_failure: true build-adder-collator: