File tree Expand file tree Collapse file tree 5 files changed +18
-16
lines changed
Expand file tree Collapse file tree 5 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,11 @@ pub struct ParsedSqlFile {
1717}
1818
1919impl ParsedSqlFile {
20- /// A parsed SQL file containing DataFusion AST nodes paired with their spans.
20+ /// A parsed SQL file containing `DataFusion` AST nodes paired with their
21+ /// spans.
2122 ///
22- /// This struct wraps DataFusion’s `Statement` parsing so we can attach leading
23- /// comments later in the pipeline.
23+ /// This struct wraps DataFusion’s `Statement` parsing so we can attach
24+ /// leading comments later in the pipeline.
2425 ///
2526 /// # Parameters
2627 /// - `file` is the [`SqlFile`] that will be parsed
Original file line number Diff line number Diff line change @@ -249,9 +249,10 @@ impl Comments {
249249 /// - `file`: the [`ParsedSqlFile`] that needs to be parsed for comments
250250 ///
251251 /// # Errors
252- /// - Will return [`CommentError::UnmatchedMultilineCommentStart`] if a comment
253- /// does not have an opening `/*`
254- /// - Will return [`CommentError::UnterminatedMultiLineComment`] if a multiline comment doesn't end before `EOF`
252+ /// - Will return [`CommentError::UnmatchedMultilineCommentStart`] if a
253+ /// comment does not have an opening `/*`
254+ /// - Will return [`CommentError::UnterminatedMultiLineComment`] if a
255+ /// multiline comment doesn't end before `EOF`
255256 pub fn parse_all_comments_from_file ( file : & ParsedSqlFile ) -> CommentResult < Self > {
256257 let src = file. content ( ) ;
257258 let comments = Self :: scan_comments ( src) ?;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ pub struct SqlDocs {
9090
9191impl SqlDocs {
9292 /// Create a new instance of [`SqlDocs`]
93- ///
93+ ///
9494 /// # Parameters
9595 /// - `tables` the `Vec` of [`TableDoc`] for the struct
9696 #[ must_use]
@@ -102,11 +102,10 @@ impl SqlDocs {
102102 ///
103103 /// This merges:
104104 /// - Parsed SQL AST (`CREATE TABLE` statements for example)
105- /// - Comment spans
106- /// into a format suitable for documentation generation.
107- ///
105+ /// - Comment spans into a format suitable for documentation generation.
106+ ///
108107 /// # Parameters
109- /// - `file`: the [`ParsedSqlFile`]
108+ /// - `file`: the [`ParsedSqlFile`]
110109 /// - `comments`: the parsed [`Comments`]
111110 #[ must_use]
112111 pub fn from_parsed_file ( file : & ParsedSqlFile , comments : & Comments ) -> Self {
Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ impl SqlFilesList {
3636 /// Creates a list of `.sql` files under `path`, optionally excluding files
3737 /// whose full paths appear in `deny_list`.
3838 ///
39- /// Paths in `deny_list` must match exactly the `PathBuf` returned by recursion.
40- /// For convenience, the top-level API accepts `&[&str]` instead.
41- ///
39+ /// Paths in `deny_list` must match exactly the `PathBuf` returned by
40+ /// recursion. For convenience, the top-level API accepts `&[&str]`
41+ /// instead.
42+ ///
4243 /// # Parameters
4344 ///
4445 /// - `path`: any type that implements [`AsRef<Path>`].
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ impl From<ParserError> for DocError {
8585/// # Errors
8686/// - Will return a `DocError` that specifies the error (io, comment parsing,
8787/// sql parsing)
88- ///
88+ ///
8989/// # Example
9090/// ```no_run
9191/// use sql_docs::generate_docs_from_dir;
@@ -124,7 +124,7 @@ pub fn generate_docs_from_dir<P: AsRef<Path>, S: AsRef<str>>(
124124/// # Errors
125125/// - Will return a `DocError` that specifies the error (io, comment parsing,
126126/// sql parsing)
127- ///
127+ ///
128128/// # Example
129129/// ```no_run
130130/// use sql_docs::generate_docs_from_dir;
You can’t perform that action at this time.
0 commit comments