sqruff_lib/core/linter/
linted_dir.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use append_only_vec::AppendOnlyVec;

use crate::core::linter::linted_file::LintedFile;

#[derive(Debug)]
pub struct LintedDir {
    pub files: AppendOnlyVec<LintedFile>,
    pub path: String,
}

impl LintedDir {
    pub fn new(path: String) -> Self {
        LintedDir {
            files: AppendOnlyVec::new(),
            path,
        }
    }

    pub fn add(&self, file: LintedFile) {
        self.files.push(file);
    }
}