Max Schaefer
8c460ae385
Merge remote-tracking branch 'upstream/master' into rc/1.20-merge-master
...
Conflict in `javascript/extractor/src/com/semmle/js/extractor/Main.java` resolved
in favour of `master`.
2019-03-21 14:46:29 +00:00
Max Schaefer
1835028b93
JavaScript: Show character code when reporting unexpected character.
2019-03-21 10:44:49 +00:00
Asger F
aaa8bfb874
TS: allow namespace imports as types
2019-03-20 10:09:18 +00:00
Max Schaefer
03a2204c30
JavaScript: Improve support for dynamic imports.
...
`yield import(...)` previously caused a syntax error, now it is parsed
correctly.
`parseYield` is the only place where the value of `startsExpr` matters,
so this change should not affect anything else.
2019-03-13 14:40:12 +00:00
Asger F
957db8374c
JS: Bump extractor version string
2019-03-11 16:53:52 +00:00
Asger F
146909ba13
TS: fix missing this type in method declarations
2019-03-11 16:53:25 +00:00
Asger F
d7f0099426
TS: bump extractor version
2019-03-11 11:26:46 +00:00
Max Schaefer
832dff54e8
JavaScript: Remove a @link in Javadoc.
...
Javadoc claims not to be able to resolve this link, while Eclipse manages to do so without any problems, failing an internal PR check.
It's only in a test, though, so I just removed it.
2019-03-05 17:02:44 +00:00
Max Schaefer
b1033b079f
JavaScript: Make configuration of parallel extraction consistent with parallel evaluation.
...
Just like parallel evaluation, the number of extractor threads is now determined by the `LGTM_THREADS` environment variable, and defaults to one.
2019-03-05 10:06:32 +00:00
Max Schaefer
c4fa29dd0f
JavaScript: Autoformat extractor sources using google-java-format.
...
No special settings; command:
find javascript/extractor/src -name "*.java" | xargs java -jar /path/to/google-java-format-1.7-all-deps.jar --replace
2019-02-28 14:30:06 +00:00
Asger F
5478e0da62
Merge pull request #998 from xiemaisi/js/autobuild-file-types
...
JavaScript: Make file types customisable in AutoBuild.
2019-02-28 15:26:35 +01:00
Max Schaefer
9d77619afc
JavaScript: Make file types customisable in AutoBuild.
...
Every once in a while we encounter projects using some custom file extension for files that we could in principle extract, but since the extractor doesn't know about the extension the files are skipped.
To handle this, the legacy extractor has a `--file-type` option that one can use to specify a file type to use for all files in that particular extraction. So far, `AutoBuild` has nothing of the sort.
This PR proposes to introduce an environment variable `LGTM_INDEX_FILETYPES` to allow a similar customisation. In the fullness of time, this variable would be set through `lgtm.yml` in the usual way, but for now it is undocumented and for internal use only.
Specifically, `LGTM_INDEX_FILETYPES` is a newline-separated list of ".extension:filetype" pairs, specifying that files with the given `.extension` should be extracted as type `filetype`, where
`filetype` is one of `js`, `html`, `json`, `typescript` or `yaml`.
For example, `.jsm:js` causes all `.jsm` files to be extracted as JavaScript.
This can also be used to override default file types: for example, by specifying `.js:typescript` all JavaScript files will be extracted as TypeScript.
2019-02-27 12:02:01 +00:00
Max Schaefer
2ed37903d8
JavaScript: Include list of relevant environment variables in Javadoc for AutoBuild.
2019-02-27 11:54:59 +00:00
Max Schaefer
6ecdb0edd5
JavaScript: Allow first expression in array literal to be an in expression.
2019-02-27 08:58:28 +00:00
Max Schaefer
fbf2774bb3
JavaScript: Accept expression-bodied function declarations in experimental mode.
2019-02-24 20:45:41 +00:00
Max Schaefer
f3ea810c21
JavaScript: Add parser support for E4X.
2019-02-24 20:45:41 +00:00
Asger F
9dae08bbcf
JS: fix javadoc
2019-02-07 13:53:29 +00:00
Asger F
e4b230ba60
Revert "Merge pull request #897 from Semmle/revert-817-closure-modules"
...
This reverts commit 95185345fd , reversing
changes made to b8be66ec48 .
2019-02-07 11:58:38 +00:00
Asger F
e46e2b2515
Revert "JS: Add support for Closure modules"
2019-02-06 17:30:45 +00:00
Asger F
c52ed9152f
JS: handle .mjs files correctly
2019-02-06 09:12:10 +00:00
Asger F
79b9784b08
JS: handle ES2015 modules compiling to Node.js modules
2019-02-04 14:26:24 +00:00
Asger F
4b32d8c63f
JS: refactor SourceType/Platform
2019-02-04 14:24:39 +00:00
Asger F
8f3b0f584a
JS: Extract predicates for ES2015/closure modules
2019-02-04 14:21:34 +00:00
Asger F
72fe63074a
JS: convert tabs to spaces
2019-02-04 14:21:34 +00:00
Asger F
6bcae5e7c2
JS: address comments
2019-02-04 14:21:34 +00:00
Asger F
30ba7aedfe
JS: split SourceType.MODULE into two
2019-02-04 14:21:34 +00:00
Asger F
f00b16e500
JS: recognize Closure modules files as modules
2019-02-04 14:21:34 +00:00
Max Schaefer
7be3336aaf
JavaScript: Document per-function caches in CFG extractor.
2019-02-04 08:17:21 +00:00
Max Schaefer
17ce21c481
JavaScript: Remove an unused import in TrapTests.java.
2019-01-30 12:29:20 +00:00
Max Schaefer
5eba486d34
JavaScript: Clear per-function CFG caches after each function.
2019-01-30 12:29:20 +00:00
Max Schaefer
6013b918fc
JavaScript: Extract tokens and comments before AST.
...
This allows us to discard token/comment information sooner, thereby reducing heap pressure for very large files.
2019-01-29 13:00:17 +00:00
Max Schaefer
99a4f34b7a
JavaScript: Omit numlines for functions.
2019-01-29 12:59:33 +00:00
Max Schaefer
d6c3ae2fb4
JavaScript: Fix bug in extraction of next_token.
2019-01-29 12:58:32 +00:00
Max Schaefer
8f8068695d
JavaScript: Bump extractor version to avoid trap cache.
2019-01-17 09:30:18 +00:00
Max Schaefer
ce65fcedc1
JavaScript: Abort AutoBuild if an exception happens in one of the extractor threads.
2019-01-17 09:29:49 +00:00
Max Schaefer
7765c6d486
JavaScript: Await termination of extractor threadpool.
2019-01-17 09:29:49 +00:00
Max Schaefer
3b5315aa7e
JavaScript: Improve logging.
2019-01-17 09:29:49 +00:00
Max Schaefer
a6cb63e9c8
JavaScript: Make number of threads configurable through LGTM_INDEX_THREADS.
...
If the number of threads specified is one or lower, we fall back onto single-threaded extraction.
2019-01-17 09:29:49 +00:00
Max Schaefer
d625ebf86d
JavaScript: Extract JavaScript files after TypeScript files.
...
This way we only start multi-threaded extraction after the TypeScript parser has already been shut down, reducing the chance of running out of memory.
2019-01-17 09:29:49 +00:00
Max Schaefer
57133f91ff
JavaScript: Prevent interleaved progress messages on stdout.
2019-01-17 09:29:49 +00:00
Max Schaefer
1c84dc011a
JavaScript: Parallelise extraction of JavaScript (but not TypeScript) files.
2019-01-17 09:29:49 +00:00
Max Schaefer
8014ded973
JavaScript: Remove static state in JSDocParser.
2019-01-17 09:29:49 +00:00
Max Schaefer
5832f7c3ad
JavaScript: Pull ExtractorState out of FileExtractor.
2019-01-17 09:29:49 +00:00
Max Schaefer
335d43b122
JavaScript: Make AutoBuild less stateful.
2019-01-17 09:29:49 +00:00
Asger F
a7b0f7e2ce
TS: upgrade script, version string, stats
2019-01-14 18:26:09 +00:00
Asger F
3ed9575529
TS: add support for bigints
2019-01-14 18:26:09 +00:00
Esben Sparre Andreasen
64346e1321
JS: bump extractor version for improved support for Flow
2019-01-13 22:10:56 +01:00
semmle-qlci
6b27dcabc5
Merge pull request #704 from asger-semmle/ts-binary-exprs
...
Approved by esben-semmle
2019-01-04 08:37:41 +00:00
Asger F
a91599e7fd
TS: bump extractor version string
2018-12-19 10:37:27 +00:00
Asger F
2044f5fe89
TS: reorganize convertBinaryExpression and create AssignmentExpression when appropriate
2018-12-17 16:23:46 +00:00