Skip to content

Commit ad99158

Browse files
committed
Ruby: Fix/accept extraction errors
1 parent 858c7ce commit ad99158

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extractionError
2+
| calls/calls.rb:8:1:8:2 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extractionError
2+
| calls.rb:8:1:8:2 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
extractionError
2+
| semantics.rb:36:18:36:23 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |
3+
| semantics.rb:36:35:36:40 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

ruby/ql/test/library-tests/dataflow/summaries/summaries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
tainted4 = Foo.firstArg(tainted)
2121
sink(tainted4) # $ hasTaintFlow=tainted
2222

23-
notTainted = Foo.firstArg(nil, tainted))
23+
notTainted = Foo.firstArg(nil, tainted)
2424
sink(notTainted)
2525

2626
tainted5 = Foo.secondArg(nil, tainted)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extractionError
2+
| app/views/foo/bars/show.html.erb:10:8:11:7 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extractionError
2+
| src/not_ruby.rb:5:25:5:26 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

ruby/ql/test/query-tests/security/cwe-300/Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ git_source(:j) { |name| "unknown://github.com/#{name}" } # GOOD
1818

1919
git_source(:k) do |name|
2020
foo
21-
"https://github.com/#{name}" } # GOOD
21+
"https://github.com/#{name}" # GOOD
2222
end
2323
git_source(:l) do |name|
2424
foo
25-
"http://github.com/#{name}" } # $result=BAD
25+
"http://github.com/#{name}" # $result=BAD
2626
end
2727
git_source(:m) do |name|
2828
foo
29-
"ftp://github.com/#{name}" } # $result=BAD
29+
"ftp://github.com/#{name}" # $result=BAD
3030
end
3131
git_source(:n) do |name|
3232
foo
33-
"ftps://github.com/#{name}" } # GOOD
33+
"ftps://github.com/#{name}" # GOOD
3434
end
3535
git_source(:o) do |name|
3636
foo
37-
"unknown://github.com/#{name}" } # GOOD
37+
"unknown://github.com/#{name}" # GOOD
3838
end
3939

4040
gem "jwt", "1.2.3", git: "https://github.com/jwt/ruby-jwt" # GOOD

0 commit comments

Comments
 (0)