Add multi-language-repo

This commit is contained in:
David Verdeguer 2020-05-08 11:51:47 +02:00
parent b73b259103
commit 583f8a923c
32 changed files with 257 additions and 0 deletions

View file

@ -0,0 +1,8 @@
class Main {
public static void main(String args[]) {
if (true) {
System.out.println("Hello, World!");
}
}
}

View file

@ -0,0 +1,8 @@
#!/bin/bash
gcc -o main main.c
dotnet build
javac Main.java

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: complex-javascript-querypack
version: 0.0.1
libraryPathDependencies: codeql-javascript

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-python-querypack
version: 0.0.1
libraryPathDependencies: codeql-python

View file

@ -0,0 +1,2 @@
- query: show_ifs.ql
- query: foo/bar/show_ifs.ql

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-cpp-querypack
version: 0.0.1
libraryPathDependencies: codeql-cpp

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-csharp-querypack
version: 0.0.1
libraryPathDependencies: codeql-csharp

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-go-querypack
version: 0.0.1
libraryPathDependencies: codeql-go

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-java-querypack
version: 0.0.1
libraryPathDependencies: codeql-java

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-javascript-querypack
version: 0.0.1
libraryPathDependencies: codeql-javascript

View file

@ -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"

View file

@ -0,0 +1,3 @@
name: inrepo-python-querypack
version: 0.0.1
libraryPathDependencies: codeql-python

View file

@ -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"

View 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>

View file

@ -0,0 +1,8 @@
#include "stdio.h"
int main(int argc, char **argv) {
if (1) {
printf("Hello, World!\n");
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace HelloWorldApp {
class Geeks {
static void Main(string[] args) {
if (true) {
Console.WriteLine("Hello World!");
}
}
}
}

View file

@ -0,0 +1,9 @@
package main
import "fmt"
func main() {
if true {
fmt.Println("hello world")
}
}

View file

@ -0,0 +1,3 @@
if (true) {
console.log("Hello, World!");
}

View file

@ -0,0 +1,9 @@
#!/usr/bin/python3
def main():
if True:
print("Hello, World!")
if __name__ == '__main__':
main()

View 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