Commit Graph

218 Commits

Author SHA1 Message Date
Tom Hvitved
3f412e4fad Desugar setter assignment operations 2021-05-25 21:27:39 +02:00
Tom Hvitved
b173cc332a Desugar setter assignments 2021-05-25 21:27:39 +02:00
Tom Hvitved
b812012b71 Add CFG setter assignment test 2021-05-25 21:27:39 +02:00
Tom Hvitved
e85677a040 Adjust locations of synthesized AST nodes 2021-05-25 21:27:34 +02:00
Arthur Baars
ce23ae33e7 Fix Scope::parentOf for HereDocBody 2021-05-25 11:27:45 +02:00
Arthur Baars
bb62564c9e Add test for heredoc with variables 2021-05-25 11:16:55 +02:00
Tom Hvitved
6b6aeb10c7 Improve performance of internal/Module.qll 2021-05-19 14:33:52 +02:00
Tom Hvitved
c866f88410 CFG: Add missing propagatesAbnormal overrides 2021-05-18 20:39:46 +02:00
Tom Hvitved
9871698cee Add more CFG tests 2021-05-18 20:39:08 +02:00
Nick Rolfe
778de741d0 Merge remote-tracking branch 'origin/main' into cfg_cleanup 2021-05-17 16:26:28 +01:00
Tom Hvitved
ad036f8af1 Merge pull request #179 from github/hvitved/synth-framework-take2
AST synthesis framework (take 2)
2021-05-17 15:36:56 +02:00
Alex Ford
3c0f20cec8 Merge pull request #170 from github/weak-file-permissions
Add `rb/overly-permissive-file` query
2021-05-14 17:04:15 +01:00
Alex Ford
6bd2e4e4b7 Merge pull request #175 from github/loc-summary-queries-1
Summary queries for total LOC and user-code LOC
2021-05-14 15:51:45 +01:00
Alex Ford
11949c6b77 Merge pull request #176 from github/diagnostics-entries
Start writing diagnostics to the DB, and some basic summary/diagnostics queries
2021-05-13 14:31:01 +01:00
Tom Hvitved
ff06e724b1 AST synthesis framework 2021-05-12 19:58:52 +02:00
Tom Hvitved
ea1c7b51ef Add more operator assignment tests 2021-05-12 17:24:11 +02:00
Alex Ford
49d9bb798c revamp the diagnostics tests 2021-05-11 19:53:00 +01:00
Alex Ford
d1d8cff915 tests for some more diagnostics queries 2021-05-11 19:14:22 +01:00
Alex Ford
de497dd1ba tests for NumberOfFiles* summary queries 2021-05-11 19:14:22 +01:00
Nick Rolfe
9def7c2dfe Make CFG for TEnsure post-order 2021-05-07 17:15:10 +01:00
Nick Rolfe
7f6805c82f Make CFG for TDo post-order 2021-05-07 17:00:30 +01:00
Nick Rolfe
46c9f858c4 Make CFG for TElse post-order 2021-05-07 16:47:19 +01:00
Nick Rolfe
2569bf257f Make CFG for TThen post-order 2021-05-07 15:40:50 +01:00
Alex Ford
e5896047d8 summary LOC query tests 2021-05-06 19:54:23 +01:00
Nick Rolfe
4e80b548c1 Make BeginBlock CFG post-order 2021-05-06 16:45:27 +01:00
Nick Rolfe
9185a93312 Make SingletonClassDeclarationTree post-order 2021-05-06 16:20:50 +01:00
Nick Rolfe
fd3d50f340 Make ModuleDeclarationTree post-order 2021-05-06 15:54:11 +01:00
Nick Rolfe
d623f47ba0 Make ClassDeclarationTree post-order 2021-05-06 15:36:25 +01:00
Nick Rolfe
569063ca73 Make YieldCallTree post-order 2021-05-05 17:14:32 +01:00
Arthur Baars
27538cb11d Update expected test output 2021-05-04 12:43:43 +02:00
Alex Ford
2c8a4f833f make rb/overly-permissive-file a proper path-problem 2021-04-29 19:11:39 +01:00
Nick Rolfe
e87bf57bc5 Avoid recursion in IPA construction 2021-04-29 18:04:15 +01:00
Nick Rolfe
bd6fe41388 Merge IPA branches for implicit self 2021-04-29 15:38:58 +01:00
Nick Rolfe
f3852f9b56 Create synthetic self nodes for calls without explicit receivers 2021-04-28 16:43:40 +01:00
Alex Ford
0a6dc6f150 update WeakFilePermissions.expected 2021-04-28 16:31:07 +01:00
Alex Ford
e5862a942f WIP rb/overly-permissive-file query 2021-04-27 21:22:17 +01:00
Arthur Baars
bc6aec7a99 Merge pull request #167 from github/alexrford/numlines
Implement FLines metrics queries
2021-04-21 14:42:18 +02:00
Alex Ford
c6b6a83501 extend FLines* tests 2021-04-21 10:42:53 +01:00
Alex Ford
a1c91e28da move FLines* tests to a common directory 2021-04-21 10:34:58 +01:00
Arthur Baars
549e5ab9d6 Revert "Rename Method -> MethodDeclaration"
This reverts commit d361ef37af.
2021-04-21 10:50:47 +02:00
Arthur Baars
1245674df8 Add missing @id properties 2021-04-21 10:50:47 +02:00
Alex Ford
50a0f282bf add basic tests for FLines queries 2021-04-20 17:36:16 +01:00
Arthur Baars
122315db3f Remove 'Method' class 2021-04-20 13:41:11 +02:00
Arthur Baars
07726fd979 Add some module and method tests 2021-04-16 11:07:57 +02:00
Arthur Baars
d361ef37af Rename Method -> MethodDeclaration 2021-04-15 11:32:43 +02:00
Arthur Baars
24bb11b20a Improve module/class resolution 2021-04-14 17:14:38 +02:00
Arthur Baars
12ee957331 Add test cases 2021-04-14 17:12:39 +02:00
Arthur Baars
754bfdd136 Ignore include/prepend statements in blocks
Include and prepend statements are rarely used in block in normal code and when
used in normal code they tend to be in blocks that are passed to methods like
`module_eval` which is a builtin method that evaluates a block in the context
of some other module (typically created with Module.new). We currently don't attempt
to track such "dynamically" constructed modules, and ignoring such modules
 and the `module_eval` calls on them seems fine for now.

Another, much more frequent use of include/prepend statements in blocks is in Rspec.describe and
Rspec.context method calls in tests. Rspec also evaluates those blocks in the context of some
special Rspec class. Precisely tracking such calls during the initial construction of the module/class
hierarchy would be really hard and there would be little benefit because the interesting modules and classes of
an application are not defined in test files.
2021-04-14 09:53:19 +02:00
Arthur Baars
280fe73063 Add test case with 'module_eval' call with block containing 'prepend' statement 2021-04-14 09:53:19 +02:00
Arthur Baars
2db999d0da Improve module resolution 2021-04-09 09:51:24 +02:00