mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Rename run.rs
command to check.rs
(#6980)
The CLI command is called "check", so this is more consistent (and consistent with the pattern used in other commands).
This commit is contained in:
parent
924f10186f
commit
34221346c1
5 changed files with 12 additions and 12 deletions
|
@ -28,7 +28,7 @@ use crate::diagnostics::Diagnostics;
|
|||
use crate::panic::catch_unwind;
|
||||
|
||||
/// Run the linter over a collection of files.
|
||||
pub(crate) fn run(
|
||||
pub(crate) fn check(
|
||||
files: &[PathBuf],
|
||||
pyproject_config: &PyprojectConfig,
|
||||
overrides: &Overrides,
|
||||
|
@ -245,7 +245,7 @@ mod test {
|
|||
|
||||
use crate::args::Overrides;
|
||||
|
||||
use super::run;
|
||||
use super::check;
|
||||
|
||||
/// We check that regular python files, pyproject.toml and jupyter notebooks all handle io
|
||||
/// errors gracefully
|
||||
|
@ -278,7 +278,7 @@ mod test {
|
|||
PyprojectConfig::new(PyprojectDiscoveryStrategy::Fixed, settings, None);
|
||||
|
||||
// Run
|
||||
let diagnostics = run(
|
||||
let diagnostics = check(
|
||||
// Notebooks are not included by default
|
||||
&[tempdir.path().to_path_buf(), notebook],
|
||||
&pyproject_config,
|
|
@ -18,7 +18,7 @@ pub(crate) fn read_from_stdin() -> Result<String> {
|
|||
}
|
||||
|
||||
/// Run the linter over a single file, read from `stdin`.
|
||||
pub(crate) fn run_stdin(
|
||||
pub(crate) fn check_stdin(
|
||||
filename: Option<&Path>,
|
||||
pyproject_config: &PyprojectConfig,
|
||||
overrides: &Overrides,
|
|
@ -1,10 +1,10 @@
|
|||
pub(crate) mod add_noqa;
|
||||
pub(crate) mod check;
|
||||
pub(crate) mod check_stdin;
|
||||
pub(crate) mod clean;
|
||||
pub(crate) mod config;
|
||||
pub(crate) mod format;
|
||||
pub(crate) mod linter;
|
||||
pub(crate) mod rule;
|
||||
pub(crate) mod run;
|
||||
pub(crate) mod run_stdin;
|
||||
pub(crate) mod show_files;
|
||||
pub(crate) mod show_settings;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: crates/ruff_cli/src/commands/run.rs
|
||||
source: crates/ruff_cli/src/commands/check.rs
|
||||
---
|
||||
/home/ferris/project/code.py:1:1: E902 Permission denied (os error 13)
|
||||
/home/ferris/project/notebook.ipynb:1:1: E902 Permission denied (os error 13)
|
Loading…
Add table
Add a link
Reference in a new issue