style(xatu): remove redundant comments
This commit is contained in:
@@ -6,19 +6,14 @@ pub mod empty_inherit;
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Finding {
|
pub struct Finding {
|
||||||
/// Identifies the rule that produced this finding.
|
|
||||||
pub rule_id: &'static str,
|
pub rule_id: &'static str,
|
||||||
/// Identifies the source range that triggered this finding.
|
|
||||||
pub range: ast::SourceRange,
|
pub range: ast::SourceRange,
|
||||||
/// Describes the finding for human-readable output.
|
|
||||||
pub message: &'static str,
|
pub message: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Diagnostic {
|
pub struct Diagnostic {
|
||||||
/// Identifies the file that contains this diagnostic.
|
|
||||||
pub file_id: FileId,
|
pub file_id: FileId,
|
||||||
/// Contains the node-local rule finding.
|
|
||||||
pub finding: Finding,
|
pub finding: Finding,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ pub use rules::{Diagnostic, Finding};
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Report {
|
pub struct Report {
|
||||||
/// Contains the analyzed source files.
|
|
||||||
pub files: FileStore,
|
pub files: FileStore,
|
||||||
/// Contains lint diagnostics from analyzed source files.
|
|
||||||
pub diagnostics: Vec<Diagnostic>,
|
pub diagnostics: Vec<Diagnostic>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Report {
|
impl Report {
|
||||||
/// Returns true when Xatu found no diagnostics.
|
|
||||||
pub fn is_clean(&self) -> bool {
|
pub fn is_clean(&self) -> bool {
|
||||||
self.diagnostics.is_empty()
|
self.diagnostics.is_empty()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user