Add multi-language-repo
This commit is contained in:
parent
b73b259103
commit
583f8a923c
32 changed files with 257 additions and 0 deletions
8
tests/multi-language-repo/Main.java
Normal file
8
tests/multi-language-repo/Main.java
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class Main {
|
||||
public static void main(String args[]) {
|
||||
if (true) {
|
||||
System.out.println("Hello, World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
tests/multi-language-repo/build.sh
Executable file
8
tests/multi-language-repo/build.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
gcc -o main main.c
|
||||
|
||||
dotnet build
|
||||
|
||||
javac Main.java
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Foo Show Ifs
|
||||
* @description Foo Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-javascript-querypack/foo-show-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "foo if"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Bar Show Ifs
|
||||
* @description Bar Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-javascript-querypack/bar-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "bar if"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Barfoobar Show Ifs
|
||||
* @description Barfoobar Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-javascript-querypack/barfoobar-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "barfoobar if"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Foo2 Show Ifs
|
||||
* @description Foo2 Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-javascript-querypack/foo2-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "foo2 if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: complex-javascript-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-javascript
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Root Show Ifs
|
||||
* @description Root Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-javascript-querypack/root-show-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "root if"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Foo/Bar Show Ifs
|
||||
* @description Foo/Bar Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-python-querypack/foo/bar/show-ifs
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
from If i
|
||||
select i, "foo/bar if"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Foo Show Ifs
|
||||
* @description Foo Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-python-querypack/foo/show-ifs
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
from If i
|
||||
select i, "foo if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-python-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-python
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
- query: show_ifs.ql
|
||||
- query: foo/bar/show_ifs.ql
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Ifs
|
||||
* @description Show Ifs
|
||||
* @kind problem
|
||||
* @id complex-python-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
from If i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-cpp-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-cpp
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Cpp Ifs
|
||||
* @description Show Cpp Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-cpp-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
from IfStmt i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-csharp-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-csharp
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Csharp Ifs
|
||||
* @description Show Csharp Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-csharp-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import csharp
|
||||
|
||||
from IfStmt i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-go-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-go
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Go Ifs
|
||||
* @description Show Go Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-go-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import go
|
||||
|
||||
from IfStmt i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-java-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-java
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Java Ifs
|
||||
* @description Show Java Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-java-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
from IfStmt i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-javascript-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-javascript
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Javascript Ifs
|
||||
* @description Show Javascript Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-javascript-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import javascript
|
||||
|
||||
from IfStmt i
|
||||
select i, "hello if"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
name: inrepo-python-querypack
|
||||
version: 0.0.1
|
||||
libraryPathDependencies: codeql-python
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* @name Show Python Ifs
|
||||
* @description Show Python Ifs
|
||||
* @kind problem
|
||||
* @id inrepo-python-querypack/show-ifs
|
||||
*/
|
||||
|
||||
import python
|
||||
|
||||
from If i
|
||||
select i, "hello if"
|
||||
9
tests/multi-language-repo/csharp.csproj
Normal file
9
tests/multi-language-repo/csharp.csproj
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>multi_language_test</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
8
tests/multi-language-repo/main.c
Normal file
8
tests/multi-language-repo/main.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include "stdio.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (1) {
|
||||
printf("Hello, World!\n");
|
||||
}
|
||||
}
|
||||
|
||||
12
tests/multi-language-repo/main.cs
Normal file
12
tests/multi-language-repo/main.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace HelloWorldApp {
|
||||
class Geeks {
|
||||
static void Main(string[] args) {
|
||||
if (true) {
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
tests/multi-language-repo/main.go
Normal file
9
tests/multi-language-repo/main.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
if true {
|
||||
fmt.Println("hello world")
|
||||
}
|
||||
}
|
||||
3
tests/multi-language-repo/main.js
Normal file
3
tests/multi-language-repo/main.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
if (true) {
|
||||
console.log("Hello, World!");
|
||||
}
|
||||
9
tests/multi-language-repo/main.py
Executable file
9
tests/multi-language-repo/main.py
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
def main():
|
||||
if True:
|
||||
print("Hello, World!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
11
tests/multi-language-repo/main.rb
Executable file
11
tests/multi-language-repo/main.rb
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
def main
|
||||
v = ARGV[0]
|
||||
|
||||
puts 'with arg?' unless v.nil?
|
||||
puts 'hello there'
|
||||
end
|
||||
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue