mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Store source code on message (#3897)
This commit is contained in:
parent
76c47a9a43
commit
381203c084
20 changed files with 537 additions and 217 deletions
|
@ -118,7 +118,7 @@ pub fn lint_path(
|
|||
{
|
||||
let metadata = path.metadata()?;
|
||||
if let Some((messages, imports)) =
|
||||
cache::get(path, package.as_ref(), &metadata, settings, autofix.into())
|
||||
cache::get(path, package, &metadata, settings, autofix.into())
|
||||
{
|
||||
debug!("Cache hit for: {}", path.display());
|
||||
return Ok(Diagnostics::new(messages, imports));
|
||||
|
@ -207,14 +207,14 @@ pub fn lint_path(
|
|||
|
||||
// Purge the cache.
|
||||
if let Some(metadata) = metadata {
|
||||
cache::del(path, package.as_ref(), &metadata, settings, autofix.into());
|
||||
cache::del(path, package, &metadata, settings, autofix.into());
|
||||
}
|
||||
} else {
|
||||
// Re-populate the cache.
|
||||
if let Some(metadata) = metadata {
|
||||
cache::set(
|
||||
path,
|
||||
package.as_ref(),
|
||||
package,
|
||||
&metadata,
|
||||
settings,
|
||||
autofix.into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue