Skip to content

Commit

Permalink
Add module documentation headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu-LAURENT39 committed May 11, 2024
1 parent c666083 commit 5a5f46e
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles configuration loading and saving
use std::fs;
use std::io::{Read, Write};
use std::path::PathBuf;
Expand Down
2 changes: 2 additions & 0 deletions src/field.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Defines the various fields available in the query language
use std::fmt::Display;
use std::fmt::Error;
use std::fmt::Formatter;
Expand Down
3 changes: 3 additions & 0 deletions src/function.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Functions for processing values in the query language.
//! This module contains both the regular and aggregate functions used in the query language.
use std::collections::HashMap;
use std::fmt::Display;
use std::fmt::Error;
Expand Down
2 changes: 2 additions & 0 deletions src/ignore/docker.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles .dockerignore parsing
use std::fs::File;
use std::io::BufRead;
use std::io::BufReader;
Expand Down
2 changes: 2 additions & 0 deletions src/ignore/git.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles .gitignore parsing
use std::collections::HashMap;
use std::fs::File;
use std::ops::Add;
Expand Down
2 changes: 2 additions & 0 deletions src/ignore/hg.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles .hgignore parsing (Mercurial)
use std::fs::File;
use std::io::BufRead;
use std::io::BufReader;
Expand Down
2 changes: 2 additions & 0 deletions src/lexer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Lexer to tokenizes SQL-like syntax into lexems
use std::str::FromStr;

use regex::Regex;
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! The entry point of the program
//! Handles the command line arguments parsing
#[macro_use]
extern crate lazy_static;
#[macro_use]
Expand Down
2 changes: 2 additions & 0 deletions src/mode.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! This module contains functions for working with file modes / permissions
use std::fs::Metadata;
#[cfg(unix)]
use std::os::unix::fs::MetadataExt;
Expand Down
2 changes: 2 additions & 0 deletions src/operators.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Defines the arithmetic operators used in the query language
use crate::function::Variant;

#[derive(Debug, Clone, Eq, Hash, PartialEq, PartialOrd, Serialize)]
Expand Down
2 changes: 2 additions & 0 deletions src/output/csv.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles export of results in CSV format
use crate::output::ResultsFormatter;
use crate::util::WritableBuffer;

Expand Down
2 changes: 2 additions & 0 deletions src/output/flat.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles export of results in line-separated, list-separated, and tab-separated formats
use crate::output::ResultsFormatter;

pub const LINES_FORMATTER: FlatWriter = FlatWriter {
Expand Down
2 changes: 2 additions & 0 deletions src/output/html.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles export of results in HTML format
use crate::output::ResultsFormatter;

pub struct HtmlFormatter;
Expand Down
2 changes: 2 additions & 0 deletions src/output/json.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles export of results in JSON format
use crate::output::ResultsFormatter;
use std::collections::BTreeMap;

Expand Down
2 changes: 2 additions & 0 deletions src/parser.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles the parsing of the query string
use std::rc::Rc;
use std::str::FromStr;

Expand Down
3 changes: 3 additions & 0 deletions src/query.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Defines the query struct and related types.
//! Query parsing is handled in the `parser` module
use std::collections::HashSet;
use std::rc::Rc;

Expand Down
2 changes: 2 additions & 0 deletions src/searcher.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Handles directory traversal and file processing.
use std::collections::{HashMap, HashSet, VecDeque};
use std::fs;
#[cfg(unix)]
Expand Down

0 comments on commit 5a5f46e

Please sign in to comment.