Skip to content

Commit 5953f42

Browse files
committed
Add codeql-custom-queries-ruby
1 parent d820ea0 commit 5953f42

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @name Empty block
3+
* @kind problem
4+
* @problem.severity warning
5+
* @id ruby/example/empty-block
6+
*/
7+
8+
import ruby
9+
10+
from Block b
11+
where b.getNumberOfStatements()= 0
12+
select b, "This is an empty block."
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Change 'getting-started' to the name of a user or organization that you have write access to.
2+
name: getting-started/codeql-extra-queries-ruby
3+
version: 0.0.0
4+
dependencies:
5+
# This uses the latest version of the codeql/ruby-all library.
6+
# You may want to change to a more precise semver string.
7+
codeql/ruby-all: "*"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<queries language="ruby"/>

0 commit comments

Comments
 (0)