[Debian-med-packaging] Bug#798900: lintian: false positive: source-is-missing for non-minified JS files

Ole Streicher olebole at debian.org
Sun Oct 11 08:41:00 UTC 2015


Sorry, I don't understand this:

Am 10.10.2015 um 22:35 schrieb Paul Wise:
> On Sun, 13 Sep 2015 21:46:37 +0000 Sascha Steinbiss wrote:
>
>> Looks like the JQuery DataTables libraries included are flagged as minified
>> without source on the basis that they have lines longer than 1024 characters: 
>> P: aegean source: source-contains-prebuilt-javascript-object data/share/vendor/jquery.dataTables.js line length is 1397 characters (>1024)
>> E: aegean source: source-is-missing data/share/vendor/jquery.dataTables.js
>> [...]
> lintian is absolutely correct to flag this file, it is generated from a
> bunch of other JavaScript files using Bash, PHP 5.4+, JSHint 2.1+ and
> the Closure compiler, at least according to the upstream git repos:
>
> https://github.com/DataTables/DataTablesSrc/
> https://github.com/DataTables/DataTables/

The Readme.md states that the files in the DataTables were generated
from the ones in DataTablesSrc, which means that DataTablesSrc contains
the *sources*. Specifically,

https://github.com/DataTables/DataTablesSrc/blob/master/js/DataTables.js

contains a line 25 (> 1024 characters long):

/*globals $,require,jQuery,define,_selector_run, [...] */

which triggers the lintian error in the case of python-astropy. I don't
see why this is real, since:

1. There is no indication that this line was not inserted manually, or
maybe automatically by the editor (emacs f.e. could probably do that
during the edit -- this would not make the file automatically generated),

2. Even if it was inserted by some script, it does not make the file
sourceless, since the source of this line is clearly the file content
itself,

3. there is no use case that you want to not edit this file, its
"source" (whatever this is). The line is a just comment, without any
influence on the semantics of the file. If you disagree here, you should
seriously consider flagging all CVS and SVN tags in source files as
"sourceless", since they are not to be edited manually as well.

--> lintian uses some heuristics here, which does obviously not match
the real life. Until this is improved, I would (again) propose to use
the "experimental" tag here; this is what this tag is for.

I would also propose to consider removing at least the line length test
for comments.

> I'm not sure what the correct heuristics to use are but in the jquery.dataTables.js case the existing ones produced the right result.
>

They don't; at least not in the case of python-astropy.

Best regards

Ole



More information about the Debian-med-packaging mailing list