Fixes the nonstopmode, adds false negatives

This commit is contained in:
Dandaedre 2024-06-23 05:27:17 +02:00
parent e6fd22db8d
commit fb8b8b0dbf
2 changed files with 7 additions and 4 deletions

View File

@ -88,10 +88,10 @@ async fn launch_subprocess(args: &MakeConfig) -> Result<Status> {
let mut built = 0;
let to_build = last_run.lines_parsed;
cmd.arg(&args.target);
if args.non_interactive {
cmd.arg("--interaction=batchmode");
cmd.arg("--interaction=nonstopmode");
}
cmd.arg(&args.target);
cmd.env("max_print_line", "3000");
// Specify that we want the command's standard output piped back to us.
cmd.stdout(Stdio::piped());

View File

@ -220,7 +220,8 @@ pub(crate) enum LineType {
MissingReference(String),
/// Generic Latex Warning
#[regex(r"(LaTex |Warning:){2}[^\n]+", |lex| lex.slice()[14..].to_string())]
// TODO: Just use a Prs like the others
#[regex(r"(LaTex |Warning:)+[^\n]+", |lex| lex.slice()[14..].to_string())]
Warning(String),
// /// Runaway argument
@ -232,6 +233,7 @@ pub(crate) enum LineType {
/// Context, mosty for boxes
// TODO: False positives / Reparsing Context("10") )) [107] (./Ecoles/Protecteur.tex
// TODO: uncaught: [UKNW] [3] [4] (./Chapters/Intro.tex (/usr/share/texmf/tex/latex/lm/ot1lmr.fd) (/usr/share/texmf/tex/latex/lm/omllmm.fd) (/usr/share/texmf/tex/latex/lm/omslmsy.fd) (/usr/share/texmf/tex/latex/lm/omxlmex.fd) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg) (/usr/share/texmf/tex/latex/lm/ts1lmr.fd)) [5 <./Images//Ico/LogoNoush.jpg>] [6]
#[regex(r"\[\d[^\]]+", |lex| lex.slice()[1..lex.slice().len()-1].to_string())]
Context(String),
@ -388,8 +390,9 @@ pub(crate) struct Status {
impl Status {
/// Add a recoverable error to the list of errors
// TODO: Print this at the end of the parse
pub(crate) fn add_error(&mut self, error_msg: String) {
self.errors += 1;
// self.errors += 1;
self.v_errors.push(error_msg);
}
}