Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion enums/src/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::Path;
use crate::common::*;
use crate::languages::*;

#[derive(Template)]
#[derive(Debug, Template)]
#[template(path = "go.go", escape = "none")]
struct GoTemplate {
c_name: String,
Expand Down
2 changes: 1 addition & 1 deletion enums/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::Path;
use crate::common::*;
use crate::languages::*;

#[derive(Template)]
#[derive(Debug, Template)]
#[template(path = "json.json", escape = "none")]
struct JsonTemplate {
names: Vec<(String, bool, String)>,
Expand Down
4 changes: 2 additions & 2 deletions enums/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::languages::*;

const MACROS_DEFINITION_DIR: &str = "data";

#[derive(Template)]
#[derive(Debug, Template)]
#[template(path = "rust.rs", escape = "none")]
struct RustTemplate {
c_name: String,
Expand All @@ -36,7 +36,7 @@ pub fn generate_rust(output: &Path, file_template: &str) -> std::io::Result<()>
Ok(())
}

#[derive(Template)]
#[derive(Debug, Template)]
#[template(path = "c_macros.rs", escape = "none")]
struct CMacrosTemplate {
u_name: String,
Expand Down
2 changes: 2 additions & 0 deletions rust-code-analysis-web/src/web/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ pub struct WebCommentInfo {
}

/// Server request configuration.
#[derive(Debug)]
pub struct WebCommentCfg {
/// Request identifier.
pub id: String,
}

/// Unit structure to implement the `Callback` trait.
#[derive(Debug)]
pub struct WebCommentCallback;

impl Callback for WebCommentCallback {
Expand Down
1 change: 1 addition & 0 deletions rust-code-analysis-web/src/web/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct WebFunctionInfo {
}

/// Server request configuration.
#[derive(Debug)]
pub struct WebFunctionCfg {
/// Request identifier.
pub id: String,
Expand Down
1 change: 1 addition & 0 deletions rust-code-analysis-web/src/web/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub struct WebMetricsInfo {
}

/// Server request configuration.
#[derive(Debug)]
pub struct WebMetricsCfg {
/// Request identifier.
pub id: String,
Expand Down
1 change: 1 addition & 0 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ pub struct AstCallback {
}

/// Configuration options for retrieving the nodes of an `AST`.
#[derive(Debug)]
pub struct AstCfg {
/// The id associated to a request for an `AST`
pub id: String,
Expand Down
1 change: 1 addition & 0 deletions src/comment_rm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ fn remove_from_code(code: &[u8], mut spans: Vec<(usize, usize, usize)>) -> Vec<u
}

/// Configuration options for removing comments from a code.
#[derive(Debug)]
pub struct CommentRmCfg {
/// If `true`, the modified code is saved on a file
pub in_place: bool,
Expand Down
2 changes: 2 additions & 0 deletions src/concurrent_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type ProcPathFunction<Config> = dyn Fn(&Path, &Config) + Send + Sync;
fn null_proc_dir_paths<Config>(_: &mut HashMap<String, Vec<PathBuf>>, _: &Path, _: &Config) {}
fn null_proc_path<Config>(_: &Path, _: &Config) {}

#[derive(Debug)]
struct JobItem<Config> {
path: PathBuf,
cfg: Arc<Config>,
Expand Down Expand Up @@ -141,6 +142,7 @@ pub enum ConcurrentErrors {
}

/// Data related to files.
#[derive(Debug)]
pub struct FilesData {
/// Kind of files included in a search.
pub include: GlobSet,
Expand Down
1 change: 1 addition & 0 deletions src/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn count<T: ParserTrait>(parser: &T, filters: &[String]) -> (usize, usize) {

/// Configuration options for counting different
/// types of nodes in a code.
#[derive(Debug)]
pub struct CountCfg {
/// Types of nodes to count
pub filters: Vec<String>,
Expand Down
1 change: 1 addition & 0 deletions src/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn find<'a, T: ParserTrait>(parser: &'a T, filters: &[String]) -> Option<Vec

/// Configuration options for finding different
/// types of nodes in a code.
#[derive(Debug)]
pub struct FindCfg {
/// Path to the file containing the code
pub path: PathBuf,
Expand Down
1 change: 1 addition & 0 deletions src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ fn dump_spans(mut spans: Vec<FunctionSpan>, path: PathBuf) -> std::io::Result<()

/// Configuration options for detecting the span of
/// each function in a code.
#[derive(Debug)]
pub struct FunctionCfg {
/// Path to the file containing the code
pub path: PathBuf,
Expand Down
4 changes: 2 additions & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tree_sitter::{Parser, TreeCursor};
use crate::checker::Checker;
use crate::traits::{LanguageInfo, Search};

#[derive(Clone)]
#[derive(Clone, Debug)]
pub(crate) struct Tree(OtherTree);

impl Tree {
Expand All @@ -24,7 +24,7 @@ impl Tree {
}

/// An `AST` node.
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub struct Node<'a>(OtherNode<'a>);

impl<'a> Node<'a> {
Expand Down
1 change: 1 addition & 0 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ pub fn operands_and_operators<'a, T: ParserTrait>(parser: &'a T, path: &'a Path)

/// Configuration options for retrieving
/// all the operands and operators in a code.
#[derive(Debug)]
pub struct OpsCfg {
/// Path to the file containing the code.
pub path: PathBuf,
Expand Down
1 change: 1 addition & 0 deletions src/output/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ fn dump_tree_helper(
}

/// Configuration options for dumping the `AST` of a code.
#[derive(Debug)]
pub struct DumpCfg {
/// The first line of code to dump
///
Expand Down
1 change: 1 addition & 0 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use crate::node::{Node, Tree};
use crate::preproc::{get_macros, PreprocResults};
use crate::traits::*;

#[derive(Debug)]
pub struct Parser<
T: LanguageInfo
+ Alterator
Expand Down
1 change: 1 addition & 0 deletions src/spaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ pub fn metrics<'a, T: ParserTrait>(parser: &'a T, path: &'a Path) -> Option<Func

/// Configuration options for computing
/// the metrics of a code.
#[derive(Debug)]
pub struct MetricsCfg {
/// Path to the file containing the code
pub path: PathBuf,
Expand Down