Re: [PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation

2021-01-05 Thread Nicolai Fischer
On Tue 05.01.21 09:57, Joe Perches wrote: > On Mon, 2021-01-04 at 14:09 -0800, Joe Perches wrote: >> On Sun, 2021-01-03 at 08:50 +0100, Nicolai Fischer wrote: >>> Adds a new warning in case the indentation level of the >>> first line of a Kconfig help message

[PATCH v3 0/5] update kconfig parsing

2021-01-02 Thread Nicolai Fischer
This series updates the parsing of Kconfig files within checkpatch.pl to the current state, as discussed previously. Third iteration fixes patch 3 and adds one new patch. Patch 5 adds a new waring regarding the indentation of a Kconfig block Nicolai Fischer (5): checkpatch: kconfig: replace

[PATCH v3 4/5] checkpatch: kconfig: clarify warning for paragraph length

2021-01-02 Thread Nicolai Fischer
correctly. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 209880810aaa..805b5870803f 100755 --- a/scripts

[PATCH v3 2/5] checkpatch: kconfig: add missing types to regex

2021-01-02 Thread Nicolai Fischer
Kconfig parsing does not recognise all type attributes. This adds the missing 'int', 'string' and 'hex' types. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 ins

[PATCH v3 5/5] checkpatch: kconfig: enforce block indentation

2021-01-02 Thread Nicolai Fischer
Adds a new warning to checkpatch in case a new Kconfig block is not indented one sigle tab more than the keyword which starts it. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer --- scripts/checkpatch.pl | 13 +++-- 1 file changed, 11

[PATCH v3 3/5] checkpatch: kconfig: enforce help text indentation

2021-01-02 Thread Nicolai Fischer
: Nicolai Fischer --- Now matches indentation of two or more spaces, instead of exactly two. scripts/checkpatch.pl | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c86a971a3205..209880810aaa 100755 --- a

[PATCH v3 1/5] checkpatch: kconfig: replace '---help---' with 'help'

2021-01-02 Thread Nicolai Fischer
All '---help---' lines have been replaced by just 'help'. Therefore it is no longer necessary to include '---' in the regex. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer Acked-by: Joe Perches --- scripts/checkp

[PATCH v2 3/4] checkpatch: kconfig: enforce help text indentation

2020-12-26 Thread Nicolai Fischer
Adds a new warning in case the indentation level of the first line of a Kconfig help message is not two spaces higher than the keyword itself. Blank lines between the message and the help keyword are ignored. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai

[PATCH v2 4/4] checkpatch: kconfig: clarify warning for paragraph length

2020-12-26 Thread Nicolai Fischer
correctly. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index aa2205ee9ab8..bc363933e0aa 100755 --- a/scripts

[PATCH v2 1/4] checkpatch: kconfig: replace '---help---' with 'help'

2020-12-26 Thread Nicolai Fischer
All '---help---' lines have been replaced by just 'help'. Therefore it is no longer necessary to include '---' in the regex. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer Acked-by: Joe Perches --- scripts/checkp

[PATCH v2 0/4] checkpatch: update kconfig parsing

2020-12-26 Thread Nicolai Fischer
This series updates the parsing of Kconfig files within checkpatch.pl to the current state, as discussed previously. The second iteration contains two more patches. Patch 3 adds a new warning regarding the indentation as discussed. Patch 4 aims to clarify the existing warning. Nicolai Fischer (4

[PATCH v2 2/4] checkpatch: kconfig: add missing types to regex

2020-12-26 Thread Nicolai Fischer
Kconfig parsing does not recognise all type attributes. This adds the missing 'int', 'string' and 'hex' types. Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay Signed-off-by: Nicolai Fischer --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 ins

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-25 Thread Nicolai Fischer
On 12/21/20 6:17 PM, Joe Perches wrote: > On Mon, 2020-12-21 at 16:08 +0100, Nicolai Fischer wrote: >> On Sun, 2020-12-20 at 20:16 +0100, Joe Perches wrote: >>> On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: >>>> Kconfig parsing does not recognise all t

Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-21 Thread Nicolai Fischer
On Sun, 2020-12-20 at 20:16 +0100, Joe Perches wrote: > On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: >> Kconfig parsing does not recognise all type attributes. >> This adds the missing 'int', 'sting' and 'hex' types. > [] >> diff

[PATCH 2/2] checkpatch: kconfig: add missing types to regex

2020-12-14 Thread Nicolai Fischer
Kconfig parsing does not recognise all type attributes. This adds the missing 'int', 'sting' and 'hex' types. Signed-off-by: Nicolai Fischer Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 ins

[PATCH 1/2] checkpatch: kconfig: replace '---help---' with 'help'

2020-12-14 Thread Nicolai Fischer
All '---help---' lines have been replaced by just 'help'. Therefore it is no longer necessary to include '---' in the regex. Signed-off-by: Nicolai Fischer Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay --- scripts/checkpatch.pl | 2 +- 1 f

[PATCH 0/2] checkpatch: update kconfig parsing

2020-12-14 Thread Nicolai Fischer
This series updates the parsing of Kconfig files within checkpatch.pl to the current state, as discussed previously. Nicolai Fischer (2): checkpatch: kconfig: replace '---help---' with 'help' checkpatch: kconfig: add missing types to regex scripts/checkpatch.pl | 4 ++-

Re: [RFC PATCH v2] checkpatch: rewrite Kconfig parsing

2020-12-09 Thread Nicolai Fischer
On 12/8/20 7:58 PM, Joe Perches wrote: > On Tue, 2020-12-08 at 18:18 +0100, Nicolai Fischer wrote: >> Checkpatch currently only warns if the help text is too short. >> To determine this the diff gets parsed for keywords starting >> a new entry, but several kinds of false pos

[RFC PATCH v2] checkpatch: rewrite Kconfig parsing

2020-12-08 Thread Nicolai Fischer
more robust and includes new warnings if: 1) the help attribute is not specified last 2) there is no blank line or endif before the next keyword 3) the help text is not indented 2 spaces more than the attribute itself. Signed-off-by: Nicolai Fischer Co-developed-by: Johannes Czekay Signed-off

[RFC PATCH] checkpatch: correctly detect lines of help text

2020-12-02 Thread Nicolai Fischer
USER This patch fixes this behavior by using the indentation to determine the end of the help message. Signed-off-by: Nicolai Fischer Co-developed-by: Johannes Czekay Signed-off-by: Johannes Czekay --- The code responsible for counting the lines of the help message seems overly complicated an