Refactor SourceKind to store file content (#6640)

This commit is contained in:
Micha Reiser 2023-08-18 15:45:38 +02:00 committed by GitHub
parent 2aeb27334d
commit ea72d5feba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 206 additions and 179 deletions

View file

@ -177,7 +177,7 @@ impl Printer {
return Ok(());
}
let context = EmitterContext::new(&diagnostics.source_kind);
let context = EmitterContext::new(&diagnostics.notebooks);
match self.format {
SerializationFormat::Json => {
@ -364,7 +364,7 @@ impl Printer {
writeln!(writer)?;
}
let context = EmitterContext::new(&diagnostics.source_kind);
let context = EmitterContext::new(&diagnostics.notebooks);
TextEmitter::default()
.with_show_fix_status(show_fix_status(self.autofix_level))
.with_show_source(self.flags.intersects(Flags::SHOW_SOURCE))