Expose a public 'check' method (#289)

This commit is contained in:
Charlie Marsh 2022-09-30 11:30:37 -04:00 committed by GitHub
parent 1e36c109c6
commit 417764d309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 3 deletions

View file

@ -16,7 +16,7 @@ use crate::settings::Settings;
use crate::{cache, fs, noqa};
/// Collect tokens up to and including the first error.
fn tokenize(contents: &str) -> Vec<LexResult> {
pub(crate) fn tokenize(contents: &str) -> Vec<LexResult> {
let mut tokens: Vec<LexResult> = vec![];
for tok in lexer::make_tokenizer(contents) {
let is_err = tok.is_err();
@ -28,7 +28,7 @@ fn tokenize(contents: &str) -> Vec<LexResult> {
tokens
}
fn check_path(
pub(crate) fn check_path(
path: &Path,
contents: &str,
tokens: Vec<LexResult>,