mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby: Move extractor into shared crate
This makes it possible for different languages to share this extractor.
This commit is contained in:
BIN
ruby/extractor/Cargo.lock
generated
BIN
ruby/extractor/Cargo.lock
generated
Binary file not shown.
@@ -22,3 +22,4 @@ lazy_static = "1.4.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
codeql-extractor = { path = "../../shared/extractor" }
|
||||
|
||||
@@ -11,7 +11,7 @@ use std::io::BufRead;
|
||||
use std::path::{Path, PathBuf};
|
||||
use tree_sitter::{Language, Parser, Range};
|
||||
|
||||
use ruby_extractor::{diagnostics, extractor, file_paths, node_types, trap};
|
||||
use codeql_extractor::{diagnostics, extractor, file_paths, node_types, trap};
|
||||
|
||||
/**
|
||||
* Gets the number of threads the extractor should use, by reading the
|
||||
|
||||
@@ -6,8 +6,8 @@ use std::io::LineWriter;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use ruby_extractor::generator::{dbscheme, language::Language, ql, ql_gen};
|
||||
use ruby_extractor::node_types;
|
||||
use codeql_extractor::generator::{dbscheme, language::Language, ql, ql_gen};
|
||||
use codeql_extractor::node_types;
|
||||
|
||||
/// Given the name of the parent node, and its field information, returns a pair,
|
||||
/// the first of which is the field's type. The second is an optional dbscheme
|
||||
|
||||
2
shared/extractor/.gitignore
vendored
Normal file
2
shared/extractor/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/target
|
||||
/Cargo.lock
|
||||
17
shared/extractor/Cargo.toml
Normal file
17
shared/extractor/Cargo.toml
Normal file
@@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "codeql-extractor"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["GitHub"]
|
||||
|
||||
[dependencies]
|
||||
flate2 = "1.0"
|
||||
tree-sitter = "0.20"
|
||||
tracing = "0.1"
|
||||
rayon = "1.5.0"
|
||||
regex = "1.7.1"
|
||||
encoding = "0.2"
|
||||
lazy_static = "1.4.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
Reference in New Issue
Block a user