[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DEB_BUILD_OPTIONS=nowerror



Quoting Helmut Grohne (2023-02-24 08:27:53)
> shellcheck:
>  * grml-debootstrap

not run with DEB_BUILD_OPTIONS=nocheck
https://sources.debian.org/src/grml-debootstrap/0.103/debian/rules/?hl=13#L13

>  * josm-installer

not run with DEB_BUILD_OPTIONS=nocheck
https://sources.debian.org/src/josm-installer/0.0.2+svn18515/debian/rules/?hl=25#L25

>  * kdump-tools

not run with DEB_BUILD_OPTIONS=nocheck
https://sources.debian.org/src/kdump-tools/1:1.8.1/debian/rules/?hl=64#L64

>  * python-sshoot

not run with DEB_BUILD_OPTIONS=nocheck (as dh_auto_test is skipped in that case)
https://sources.debian.org/src/python-sshoot/1.4.2-2/debian/rules/?hl=23#L23

>  * sshcommand

Indeed, that one seems to always run shellcheck:
https://sources.debian.org/src/sshcommand/0~20160110.1~2795f65-1.1/debian/rules/?hl=7#L7

>  * uwsgi

Also always run:
https://sources.debian.org/src/uwsgi/2.0.21-4/debian/rules/?hl=570#L570


I question the conflation of a hypothetical DEB_BUILD_OPTIONS=nowerror with
other linters like shellcheck (or other tools for other programming languages).

I believe that sshcommand and uwsgi should have shellcheck not run with
DEB_BUILD_OPTIONS=nocheck, so I filed:

https://salsa.debian.org/debian/sshcommand/-/merge_requests/1
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031857

I'm surprised you are conflating shellcheck with the question about -Werror. I
don't yet understand why you would like to skip shellcheck by setting
DEB_BUILD_OPTIONS=nowerror and not by setting DEB_BUILD_OPTIONS=nocheck?

Yes, -Werror is also a kind of check but whether -Werror should be not be
passed when DEB_BUILD_OPTIONS=nocheck is given, is a slightly different
question I think.

Quoting Shengjing Zhu (2023-02-24 09:14:46)
> On Fri, Feb 24, 2023 at 2:26 PM Helmut Grohne <helmut@subdivi.de> wrote:
> >
> > Hi,
> >
> > I observe a pattern repeated at least twice and probably more often in
> > packages.
> >
> >  * A package adds -Werror to the build. When a new toolchain version is
> >    uploaded, it triggers a new warning and that makes the package FTBFS.
> >  * A package runs shellcheck during build. When a new shellcheck is
> >    uploaded, it triggers a new warning and makes the package FTBFS.
> >
>█
> IMO, these are just linters. And shouldn't not run after the source is released.
>█
> I'd like to propose the option name `nolint`.

I think that there is value to run linters at build time in a default build
because (as shown by Helmut's initial mail) new version of linters may show
different problems compared to the old version and those only get fixed if the
build breaks. So I think it's useful to have a package FTBFS if a new version
of a linter introduces a failure.

But of course there is also a use-case of disabling linters if one is not doing
a default build. So I think the more interesting questions are:

Should there be a new DEB_BUILD_OPTIONS=nowerror that disables -Werror?

Should DEB_BUILD_OPTIONS=nowerror also disable other linters?

Should other linters like shellcheck be disabled with
DEB_BUILD_OPTIONS=nocheck?

Should -Werror be disabled with DEB_BUILD_OPTIONS=nocheck?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: