All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Martincoski <ricardo.martincoski@gmail.com>
To: romain.naour@smile.fr
Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree
Date: Sun, 31 Jul 2022 11:31:10 -0300	[thread overview]
Message-ID: <62e6922ed41f6_bff739ec-35d@xultri.mail> (raw)
In-Reply-To: 6430c454-08d4-cb3b-b766-c72ea7abb691@smile.fr

[-- Attachment #1: Type: text/plain, Size: 4308 bytes --]

Hello Romain,

Thank you for your review on the series.
I will respin. I just changed the series to Changes Requested.

On Wed, Jul 27, 2022 at 09:54 AM, Romain Naour wrote:

> Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
>> ... just like check-flake8 already does.
>> 
>> When a new check_function is added to check-package, often there are
>> files in the tree that would generate warnings.
>> 
>> An example is the Sob check_function for patch files:
>> | $ ./utils/check-package --i Sob $(git ls-files) >/dev/null
>> | 369301 lines processed
>> | 46 warnings generated
>> Currently these warnings are listed when calling check-package directly,
>> and also at the output of pkg-stats, but the check_function does not run
>> on 'make check-package' (that is used to catch regressions on GitLab CI
>> 'check-package' job) until all warnings in the tree are fixed.
>> This (theoretically) allows new .patch files be added without SoB,
>> without the GitLab CI catching it.
>> 
>> Since now check-package has an ignore file to list all warnings in the
>> tree, that will eventually be fixed, there is no need to filter the
>> files passed to check-package.
>> So test all files in the tree when 'make check-package' is called.
>> It brings following advantages;
>> - any new check_function added to check-package takes place immediately
>>   for new files;
>> - adding new check_functions is less traumatic to the developer doing
>>   this, since he/she does not need anymore to fix all warnings in the
>>   tree before the new check_function takes effect;
>> - prevent regressions, e.g. ANY new .hash file must have 2 spaces;
>> - as a side-effect, print a single statistics line as output of
>>   'make ckeck-package'.
>> 
>> But just enabling the check would generate many warnings when
>> 'make check-package' is called, so update the ignore file by using:
>> $ ./utils/docker-run
>> br-user@...$ ./utils/check-package --failed-only \
>>                `git ls-tree -r --name-only HEAD` > .checkpackageignore
> 
> I guess the ultimate goal of check-package is to make .checkpackageignore empty,
> so at some point this feature should not be useful :)

I don't think we will reach the goal of 0 warnings.
From time to time we can expect new coding style rules to be added to
check-package.

> 
> checkpackageignore is actually needed to convert smoothly the code base to the
> new coding style in order to not conflict too much with pending patches in
> patchwork.

No. It is needed to decouple:
- the style rules we want to enforce for new patches submitted to the list
- from the fix for all files in the tree that does not follow yet the added rule

For instance, this series enforces all new shell scripts to fix (or explicitly
ignore) shellcheck warnings, but it does not change the hundreds of files in
the tree that do not follow that rule just because the rule was not in place
when they were added.

$ grep Shellcheck .checkpackageignore | wc -l
241

> 
> But patchwork is currently "almost" empty (compared to normal) with less than
> 200 patches, so it may be the good opportunity to apply right now a big patch
> removing all HashSpaces and shellcheck warnings (Sob warning are bit more
> complicated to handle though).

shellcheck is not so trivial too.

With this series applied any new patch applied that:
 - adds a patch file without SoB
 - adds a shell script that does not follow shellcheck
will trigger the warning in the CI build.

Someone could even come up with a git pre-commit hook to be used by maintainers ;-)

> 
> The issue with the big patch approach is that the patch must be applied right
> away. Similar to the big patch adding hashes for SourceForge-hosted packages [1].
> 
> Otherwise we have to not forget to update checkpackageignore file when fixing a
> warning in a package.

For developers, even newcomers, that follow the manual 'make check-package'
will warn about it.

And for big patches, it can be updated mechanically using patch 5.

I could also add a helper. When someone calls:
make .checkpackageignore
the file gets updated.


Regards,
Ricardo

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-31 14:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
2022-07-25 22:21   ` Arnout Vandecappelle
2022-07-24  5:48 ` [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility Ricardo Martincoski
2022-07-25 22:21   ` Arnout Vandecappelle
2022-07-24  5:48 ` [Buildroot] [PATCH 03/16] utils/check-package: create an ignore list Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 04/16] support/testing: test check-package " Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 05/16] utils/check-package: add --failed-only Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree Ricardo Martincoski
2022-07-27 12:54   ` Romain Naour
2022-07-31 14:31     ` Ricardo Martincoski [this message]
2022-07-31 19:23       ` Thomas Petazzoni via buildroot
2022-07-24  5:49 ` [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image Ricardo Martincoski
2022-07-27 13:16   ` Romain Naour
2022-07-31 14:34     ` Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch Ricardo Martincoski
2022-07-27 13:22   ` Romain Naour
2022-07-31 14:37     ` Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 09/16] support/docker: add python3-magic Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts Ricardo Martincoski
2023-04-09 21:01   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/ Ricardo Martincoski
2023-04-09 21:02   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 12/16] utils/check-package: check files in board/ Ricardo Martincoski
2023-04-09 21:02   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 13/16] utils/check-package: check files in support/ Ricardo Martincoski
2023-04-09 21:03   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package Ricardo Martincoski
2023-04-09 21:04   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings Ricardo Martincoski
2023-04-09 21:05   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 16/16] utils/checkpackagelib: warn about $(HOST_DIR)/usr Ricardo Martincoski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62e6922ed41f6_bff739ec-35d@xultri.mail \
    --to=ricardo.martincoski@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@smile.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.