Rename checks and plugins to rules (#1739)

This commit is contained in:
Charlie Marsh 2023-01-09 01:39:51 -05:00 committed by GitHub
parent caf6c65de7
commit 59155ce9f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
195 changed files with 1132 additions and 1192 deletions

View file

@ -31,10 +31,10 @@ def main(*, plugin: str, url: str) -> None:
# Create the Rust module.
os.makedirs(os.path.join(ROOT_DIR, f"src/{dir_name(plugin)}"), exist_ok=True)
with open(os.path.join(ROOT_DIR, f"src/{dir_name(plugin)}/plugins.rs"), "a"):
with open(os.path.join(ROOT_DIR, f"src/{dir_name(plugin)}/rules"), "a"):
pass
with open(os.path.join(ROOT_DIR, f"src/{dir_name(plugin)}/mod.rs"), "w+") as fp:
fp.write("pub mod plugins;\n")
with open(os.path.join(ROOT_DIR, f"src/{dir_name(plugin)}/rules"), "w+") as fp:
fp.write("pub mod rules;\n")
fp.write("\n")
fp.write(
"""#[cfg(test)]
@ -49,7 +49,7 @@ mod tests {
use crate::linter::test_path;
use crate::settings;
fn diagnostics(check_code: RuleCode, path: &Path) -> Result<()> {
fn rules(check_code: RuleCode, path: &Path) -> Result<()> {
let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy());
let diagnostics =test_path(
Path::new("./resources/test/fixtures/%s")