#864555 lintian: please use a more reliable heuristic than line length to detect source-is-missing

#864555#5
Date:
2017-06-10 15:11:51 UTC
From:
To:
On polymake 3.1 source lintian reports:

E: polymake source: source-is-missing external/js/renderers/SVGRenderer.js line length is 258 characters (>256)

An examination reveals this to be a false positive. The file is not minified, but happens to contain long lines like

_svgNode.setAttribute( 'style', 'fill: none; stroke: ' + material.color.getStyle() + '; stroke-width: ' + material.linewidth + '; stroke-opacity: ' + material.opacity + '; stroke-linecap: ' + material.linecap + '; stroke-linejoin: ' + material.linejoin );

One can argue about whether that's nice programming style, but that's not really lintian's job.
Presumably that's the way the upstream author likes to edit code.


- -- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lintian depends on:
ii  binutils                          2.28-5
ii  bzip2                             1.0.6-8.1
ii  diffstat                          1.61-1+b1
ii  file                              1:5.30-1
ii  gettext                           0.19.8.1-2
ii  intltool-debian                   0.35.0+20060710.4
ii  libapt-pkg-perl                   0.1.32
ii  libarchive-zip-perl               1.59-1
ii  libclass-accessor-perl            0.34-1
ii  libclone-perl                     0.38-2+b1
ii  libdpkg-perl                      1.18.24
ii  libemail-valid-perl               1.202-1
ii  libfile-basedir-perl              0.07-1
ii  libipc-run-perl                   0.94-1
ii  liblist-moreutils-perl            0.416-1+b1
ii  libparse-debianchangelog-perl     1.2.0-12
ii  libperl5.24 [libdigest-sha-perl]  5.24.1-3
ii  libtext-levenshtein-perl          0.13-1
ii  libtimedate-perl                  2.3000-2
ii  liburi-perl                       1.71-1
ii  libyaml-libyaml-perl              0.63-2
ii  man-db                            2.7.6.1-2
ii  patchutils                        0.3.4-2
ii  perl                              5.24.1-3
ii  t1utils                           1.39-2
ii  xz-utils                          5.2.2-1.2+b1

Versions of packages lintian recommends:
ii  dpkg                                 1.18.24
ii  libperlio-gzip-perl                  0.19-1+b2
ii  perl                                 5.24.1-3
ii  perl-modules-5.24 [libautodie-perl]  5.24.1-3

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  dpkg-dev               1.18.24
ii  libhtml-parser-perl    3.72-3
ii  libtext-template-perl  1.46-1

- -- no debconf information
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlk8DDYACgkQ8gKXHaSn
nizyNAv/VzxLHBBLRmRSTYB81xJB4fx4kmMM6ZgPEsYnB/YpF5qQIYpAFSc54A2d
qNMJLQa0MC2Uo5r47qbBzpQ9yYAM0D5g5t0YGYq5bB5l7bmrIbVusxb2IV1PYlvW
gx0vYKlC8awRv/S1jQd4JJ7rMwpDv/ipJTArwQ6jrKVjNtVdWEs+Z4OkzKhwwdvt
GC+OIu4M+4IkW10+IUjvU6hmlNlAU2ZEG8MSgunwrm+RYotKqehbN2UAw84pQfPK
OfugOMPRHyOYJCwkW8sdwtWYl6z+fVPx2KrultoP0rLEYaaC+rBep57wIcvCm9dY
fFS9G5SHimnMxWHTdrWhD2EczrUN3ceAkAVo+dZHNTc7PuxMmxJL9Zpwdy8LgUs5
efI/HUEDsDrdKelrIq9P1Piqv5o+dm2sxE7gvRR7S4w1e71P5vfqchuQI5C6uQAJ
r4UaAiVqWIScIJzvc0UFg5eKGzOoImxPJCWrH2SBmuyW023vB5GMK9mgbqHWls1q
5DOgUILU
=JHbp
-----END PGP SIGNATURE-----

#864555#16
Date:
2022-04-05 16:02:18 UTC
From:
To:
I agree source-is-missing has far too much false positive to be useful.

To detect minified js, maybe one should also check that the lines only
have very few whitespaces, or even only whitespace between quotes.

Cheers,