Skip to content

Commit

Permalink
fix flake in static analysis test
Browse files Browse the repository at this point in the history
  • Loading branch information
kvey committed Jul 11, 2024
1 parent f90a643 commit c41ba5f
Show file tree
Hide file tree
Showing 29 changed files with 561 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function setupPipeline(x) {\n ch.p(create_dockerfile)\n return x\n}\n"
---
- - InFunction: setupPipeline
- - InFunction:
- setupPipeline
- start: 1
end: 71
- Params
- IdentifierReferredTo:
- x
- false
- - InFunction: setupPipeline
- - InFunction:
- setupPipeline
- start: 1
end: 71
- InCallExpression
- Attribute: p
- IdentifierReferredTo:
Expand All @@ -16,7 +22,10 @@ description: "function setupPipeline(x) {\n ch.p(create_dockerfile)\n retu
- IdentifierReferredTo:
- create_dockerfile
- false
- - InFunction: setupPipeline
- - InFunction:
- setupPipeline
- start: 1
end: 71
- IdentifierReferredTo:
- x
- true
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function subtract(a, b) {\n return a - b;\n}\n\n// Example usage\nconst v = subtract(x, 5);\n"
---
- - InFunction: subtract
- - InFunction:
- subtract
- start: 1
end: 46
- Params
- IdentifierReferredTo:
- a
- false
- IdentifierReferredTo:
- b
- false
- - InFunction: subtract
- - InFunction:
- subtract
- start: 1
end: 46
- IdentifierReferredTo:
- a
- true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
---
source: chidori-static-analysis/src/language/javascript/parse.rs
expression: context_stack_references
description: "function evaluate_agent(ev) {\n ch.set(\"file_path\", ev.file_path)\n migration_agent()\n}\n"
---
- - InFunction: evaluate_agent
- - InFunction:
- evaluate_agent
- start: 1
end: 92
- Params
- IdentifierReferredTo:
- ev
- false
- - InFunction: evaluate_agent
- - InFunction:
- evaluate_agent
- start: 1
end: 92
- InCallExpression
- Attribute: set
- IdentifierReferredTo:
Expand All @@ -18,9 +24,15 @@ expression: context_stack_references
- IdentifierReferredTo:
- ev
- true
- - InFunction: evaluate_agent
- - InFunction:
- evaluate_agent
- start: 1
end: 92
- InCallExpression
- IdentifierReferredTo:
- migration_agent
- false
- - InFunction: evaluate_agent
- - InFunction:
- evaluate_agent
- start: 1
end: 92
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function migrationAgent() {\n ch.register();\n ch.set(\"bar\", 1);\n}\n"
---
- - InFunction: migrationAgent
- - InFunction:
- migrationAgent
- start: 1
end: 71
- Params
- - InFunction: migrationAgent
- - InFunction:
- migrationAgent
- start: 1
end: 71
- InCallExpression
- Attribute: register
- IdentifierReferredTo:
- ch
- false
- - InFunction: migrationAgent
- - InFunction:
- migrationAgent
- start: 1
end: 71
- InCallExpression
- Attribute: set
- IdentifierReferredTo:
- ch
- false
- Constant: bar
- - InFunction: migrationAgent
- - InFunction:
- migrationAgent
- start: 1
end: 71
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,38 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function dispatch_agent(ev) {\n ch.onEvent(\"new_file\")\n ch.emitAs(\"file_created\")\n ch.emitAs(\"file_created\", \"multiple\", \"args\")\n ch.set(\"file_path\", ev.file_path)\n}\n"
---
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
- Params
- IdentifierReferredTo:
- ev
- false
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
- InCallExpression
- Attribute: onEvent
- IdentifierReferredTo:
- ch
- false
- Constant: new_file
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
- InCallExpression
- Attribute: emitAs
- IdentifierReferredTo:
- ch
- false
- Constant: file_created
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
- InCallExpression
- Attribute: emitAs
- IdentifierReferredTo:
Expand All @@ -30,7 +42,10 @@ description: "function dispatch_agent(ev) {\n ch.onEvent(\"new_file\")\n c
- Constant: file_created
- Constant: multiple
- Constant: args
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
- InCallExpression
- Attribute: set
- IdentifierReferredTo:
Expand All @@ -41,4 +56,7 @@ description: "function dispatch_agent(ev) {\n ch.onEvent(\"new_file\")\n c
- IdentifierReferredTo:
- ev
- true
- - InFunction: dispatch_agent
- - InFunction:
- dispatch_agent
- start: 1
end: 177
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function createDockerfile() {\n useHook(() => {\n ch.prompt(\"demo\");\n }, [otherFunction]);\n return prompt(\"prompts/create_dockerfile\")\n}\n"
---
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- Params
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- InCallExpression
- IdentifierReferredTo:
- useHook
- false
- InAnonFunction
- Params
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- InCallExpression
- IdentifierReferredTo:
- useHook
Expand All @@ -23,21 +32,33 @@ description: "function createDockerfile() {\n useHook(() => {\n ch.prom
- ch
- false
- Constant: demo
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- InCallExpression
- IdentifierReferredTo:
- useHook
- false
- InAnonFunction
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- InCallExpression
- IdentifierReferredTo:
- useHook
- false
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
- InCallExpression
- IdentifierReferredTo:
- prompt
- false
- Constant: prompts/create_dockerfile
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 150
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function createDockerfile() {\n return prompt(\"prompts/create_dockerfile\")\n}\n"
---
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 79
- Params
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 79
- InCallExpression
- IdentifierReferredTo:
- prompt
- false
- Constant: prompts/create_dockerfile
- - InFunction: createDockerfile
- - InFunction:
- createDockerfile
- start: 1
end: 79
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function main() {\n bar() | foo() | baz()\n}\n"
---
- - InFunction: main
- - InFunction:
- main
- start: 1
end: 46
- Params
- - InFunction: main
- - InFunction:
- main
- start: 1
end: 46
- InCallExpression
- IdentifierReferredTo:
- bar
- false
- - InFunction: main
- - InFunction:
- main
- start: 1
end: 46
- InCallExpression
- IdentifierReferredTo:
- foo
- false
- - InFunction: main
- - InFunction:
- main
- start: 1
end: 46
- InCallExpression
- IdentifierReferredTo:
- baz
- false
- - InFunction: main
- - InFunction:
- main
- start: 1
end: 46
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function testing(x) {\n return x\n}\n "
---
internal_call_graph: {}
cell_exposed_values: {}
cell_depended_values: {}
triggerable_functions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function testing(x) {\n return x\n}\n "
---
- - InFunction: testing
- - InFunction:
- testing
- start: 1
end: 37
- Params
- IdentifierReferredTo:
- x
- false
- - InFunction: testing
- - InFunction:
- testing
- start: 1
end: 37
- IdentifierReferredTo:
- x
- true
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
source: chidori-static-analysis/src/language/javascript/parse.rs
description: "function testing() {\n ch.onEvent(\"new_file\");\n ch.emitAs(\"file_created\");\n const x = 2 + y;\n return x\n}\n "
---
internal_call_graph: {}
cell_exposed_values: {}
cell_depended_values:
y: {}
Expand Down
Loading

0 comments on commit c41ba5f

Please sign in to comment.