[RFC PATCH] gitlab: work harder to avoid false positives in checkpatch

Alex Bennée posted 1 patch 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210602153247.27651-1-alex.bennee@linaro.org
.gitlab-ci.d/static_checks.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[RFC PATCH] gitlab: work harder to avoid false positives in checkpatch
Posted by Alex Bennée 2 years, 10 months ago
This copies the behaviour of patchew's configuration to make the diff
algorithm generate a minimal diff.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .gitlab-ci.d/static_checks.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index 91247a6f67..ec09da799d 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -3,7 +3,11 @@ check-patch:
   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
   needs:
     job: amd64-centos8-container
-  script: .gitlab-ci.d/check-patch.py
+  script:
+    - git config --local diff.renamelimit 0
+    - git config --local diff.renames True
+    - git config --local diff.algorithm histogram
+    - .gitlab-ci.d/check-patch.py
   variables:
     GIT_DEPTH: 1000
   rules:
-- 
2.20.1


Re: [RFC PATCH] gitlab: work harder to avoid false positives in checkpatch
Posted by Philippe Mathieu-Daudé 2 years, 10 months ago
On 6/2/21 5:32 PM, Alex Bennée wrote:
> This copies the behaviour of patchew's configuration to make the diff
> algorithm generate a minimal diff.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  .gitlab-ci.d/static_checks.yml | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


Re: [RFC PATCH] gitlab: work harder to avoid false positives in checkpatch
Posted by Wainer dos Santos Moschetta 2 years, 10 months ago
Hi,

On 6/2/21 12:32 PM, Alex Bennée wrote:
> This copies the behaviour of patchew's configuration to make the diff
> algorithm generate a minimal diff.

I was intrigued on where you had found that configuration. Then I found 
it myself here:

https://patchew.org/logs/20210604155532.1499282-1-jsnow@redhat.com/testing.checkpatch/?type=message

Assuming patchew has been doing the right thing, I think it is a good 
idea to configure Git alike on CI.

Thus:

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>


>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   .gitlab-ci.d/static_checks.yml | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
> index 91247a6f67..ec09da799d 100644
> --- a/.gitlab-ci.d/static_checks.yml
> +++ b/.gitlab-ci.d/static_checks.yml
> @@ -3,7 +3,11 @@ check-patch:
>     image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
>     needs:
>       job: amd64-centos8-container
> -  script: .gitlab-ci.d/check-patch.py
> +  script:
> +    - git config --local diff.renamelimit 0
> +    - git config --local diff.renames True
> +    - git config --local diff.algorithm histogram
> +    - .gitlab-ci.d/check-patch.py
>     variables:
>       GIT_DEPTH: 1000
>     rules: