aboutsummaryrefslogtreecommitdiff
path: root/common/checks.js
Commit message (Collapse)AuthorAgeFilesLines
* changing license definition to jsonYuchen Pei2022-10-131-1/+1
| | | | and reuse it in the manual
* fixing a few problems with @license / @license-end regexesYuchen Pei2022-10-131-11/+24
| | | | | | | - trailing whitespace, including newlines are consumed by the opneing regex (added a test case) - added a test case for /* @license ... */ ... /* @license-end */
* `// @license` should be at the beginning of a line (mod whitespace)Yuchen Pei2022-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the following will be processed for @license / @license-end method: // foo.js // // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0 // document.getElementById('bar'); // // @license-end function foo(x, y) { console.log(x + y); } $ node ./utitlities/check-script foo.js [ true, '// // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0\n' + "// document.getElementById('bar');\n" + '// // @license-end\n' + 'function foo(x, y) {\n' + ' console.log(x + y);\n' + '}\n', '\n' + 'Recognized license: "GNU General Public License (GPL) version 3".\n' + 'Script appears to be trivial.' ]
* fixing a typoYuchen Pei2022-09-231-1/+1
|
* typosYuchen Pei2022-09-231-1/+1
|
* move fname_data.json to commonYuchen Pei2022-09-221-1/+1
|
* Separating out script and license checking routines to common/checksYuchen Pei2022-09-221-7/+352
|
* moving some modules to common/Yuchen Pei2022-09-221-0/+90