All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found
@ 2022-03-03 22:14 Rob Herring
  2022-03-04  7:09 ` Krzysztof Kozlowski
  2022-03-04  8:59 ` Geert Uytterhoeven
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2022-03-03 22:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: devicetree, linux-kernel, Geert Uytterhoeven

Running yamllint is effectively required for binding schemas, so print a
warning if not found rather than silently skipping running it.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 5138d10e0601..61ec18ecc931 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -3,7 +3,8 @@ DT_DOC_CHECKER ?= dt-doc-validate
 DT_EXTRACT_EX ?= dt-extract-example
 DT_MK_SCHEMA ?= dt-mk-schema
 
-DT_SCHEMA_LINT = $(shell which yamllint)
+DT_SCHEMA_LINT := $(shell which yamllint || \
+  echo "warning: yamllint not installed, skipping. To install, run 'pip install yamllint'" >&2)
 
 DT_SCHEMA_MIN_VERSION = 2021.2.1
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found
  2022-03-03 22:14 [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found Rob Herring
@ 2022-03-04  7:09 ` Krzysztof Kozlowski
  2022-03-04  8:59 ` Geert Uytterhoeven
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-04  7:09 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, Geert Uytterhoeven

On 03/03/2022 23:14, Rob Herring wrote:
> Running yamllint is effectively required for binding schemas, so print a
> warning if not found rather than silently skipping running it.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found
  2022-03-03 22:14 [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found Rob Herring
  2022-03-04  7:09 ` Krzysztof Kozlowski
@ 2022-03-04  8:59 ` Geert Uytterhoeven
  2022-03-04 13:55   ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2022-03-04  8:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Rob,

On Thu, Mar 3, 2022 at 11:15 PM Rob Herring <robh@kernel.org> wrote:
> Running yamllint is effectively required for binding schemas, so print a
> warning if not found rather than silently skipping running it.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/Makefile
> +++ b/Documentation/devicetree/bindings/Makefile
> @@ -3,7 +3,8 @@ DT_DOC_CHECKER ?= dt-doc-validate
>  DT_EXTRACT_EX ?= dt-extract-example
>  DT_MK_SCHEMA ?= dt-mk-schema
>
> -DT_SCHEMA_LINT = $(shell which yamllint)
> +DT_SCHEMA_LINT := $(shell which yamllint || \
> +  echo "warning: yamllint not installed, skipping. To install, run 'pip install yamllint'" >&2)

Do we want to encourage people to use pip, instead of their distro's
package manager? At least Debian/Ubuntu provide yamllint packages.

So perhaps drop the install rule?

>
>  DT_SCHEMA_MIN_VERSION = 2021.2.1

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found
  2022-03-04  8:59 ` Geert Uytterhoeven
@ 2022-03-04 13:55   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-03-04 13:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Fri, Mar 04, 2022 at 09:59:12AM +0100, Geert Uytterhoeven wrote:
> Hi Rob,
> 
> On Thu, Mar 3, 2022 at 11:15 PM Rob Herring <robh@kernel.org> wrote:
> > Running yamllint is effectively required for binding schemas, so print a
> > warning if not found rather than silently skipping running it.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> 
> Thanks for your patch!
> 
> > --- a/Documentation/devicetree/bindings/Makefile
> > +++ b/Documentation/devicetree/bindings/Makefile
> > @@ -3,7 +3,8 @@ DT_DOC_CHECKER ?= dt-doc-validate
> >  DT_EXTRACT_EX ?= dt-extract-example
> >  DT_MK_SCHEMA ?= dt-mk-schema
> >
> > -DT_SCHEMA_LINT = $(shell which yamllint)
> > +DT_SCHEMA_LINT := $(shell which yamllint || \
> > +  echo "warning: yamllint not installed, skipping. To install, run 'pip install yamllint'" >&2)
> 
> Do we want to encourage people to use pip, instead of their distro's
> package manager? At least Debian/Ubuntu provide yamllint packages.
> 
> So perhaps drop the install rule?

Okay, that's what I originally had. I'm sure someone will want to 
document 'how to install yamllint' somewhere. Maybe I'll say:

warning: python package 'yamllint' not installed, skipping

To give some hint how to install.

I'm not sure exactly, but there is a minimum version of yamllint so it 
is possible the distro versions are too old. IIRC, unknown config 
settings throw an error. I think at the time I did the config everything 
had been around for at least a year or 2 and I don't think anyone has 
reported issues.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-04 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 22:14 [PATCH] dt-bindings: kbuild: Print a warning if yamllint is not found Rob Herring
2022-03-04  7:09 ` Krzysztof Kozlowski
2022-03-04  8:59 ` Geert Uytterhoeven
2022-03-04 13:55   ` Rob Herring

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.