diff --git a/Cargo.lock b/Cargo.lock index 7426bcf..b3a7013 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -374,34 +374,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "orthotypos" -version = "0.0.0" -dependencies = [ - "anyhow", - "clap", - "ignore", - "miette", - "rayon", - "regex", - "serde", - "serde_regex", - "tempfile", - "thiserror", - "toml", - "tree-sitter", - "tree-sitter-c", - "tree-sitter-cpp", - "tree-sitter-go", - "tree-sitter-json", - "tree-sitter-md", - "tree-sitter-python", - "tree-sitter-rust", - "tree-sitter-toml-ng", - "tree-sitter-yaml", - "winnow", -] - [[package]] name = "owo-colors" version = "4.0.0" @@ -773,6 +745,34 @@ dependencies = [ "tree-sitter", ] +[[package]] +name = "typope" +version = "0.0.0" +dependencies = [ + "anyhow", + "clap", + "ignore", + "miette", + "rayon", + "regex", + "serde", + "serde_regex", + "tempfile", + "thiserror", + "toml", + "tree-sitter", + "tree-sitter-c", + "tree-sitter-cpp", + "tree-sitter-go", + "tree-sitter-json", + "tree-sitter-md", + "tree-sitter-python", + "tree-sitter-rust", + "tree-sitter-toml-ng", + "tree-sitter-yaml", + "winnow", +] + [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/Cargo.toml b/Cargo.toml index 9025aeb..57f3abe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,13 @@ [package] -name = "orthotypos" +name = "typope" edition = "2021" -description = "Source code orthotypography checker" +description = "Pedantic source code checker for orthotypography mistakes and other typographical errors" publish = false license = "MIT OR Apache-2.0" readme = "README.md" rust-version = "1.80.0" +categories = ["command-line-utilities", "development-tools", "text-processing"] +keywords = ["typography", "development", "spelling", "pedantic"] [features] default = ["lang-all"] diff --git a/README.md b/README.md index 3113c1d..ac82b5e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -# `orthotypos` +# `typope` ![MSRV][rustc-image] -Tool to find [orthotypograhy][typographical-syntax] mistakes. +Pedantic tool to find [orthotypography][typographical-syntax] mistakes, +typographical errors, and other mistakes that are not covered by tools +like [`typos`][typos] to ensure that your source code is +free from typographical heresy. **This tool is still experimental.** @@ -32,4 +35,4 @@ additional terms or conditions. [typos]: https://github.com/crate-ci/typos [typographical-syntax]: https://en.wikipedia.org/wiki/Typographical_syntax -[rustc-image]: https://img.shields.io/badge/rustc-1.79+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.80+-blue.svg diff --git a/src/cli.rs b/src/cli.rs index b07a870..b6ae604 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -8,10 +8,10 @@ use ignore::DirEntry; use rayon::iter::{ParallelBridge, ParallelIterator}; -use orthotypos::config; -use orthotypos::config::Config; -use orthotypos::lang::Language; -use orthotypos::lint::Linter; +use typope::config; +use typope::config::Config; +use typope::lang::Language; +use typope::lint::Linter; #[derive(Copy, Clone, PartialEq, Eq, clap::ValueEnum, Default)] pub enum Format { diff --git a/src/lang.rs b/src/lang.rs index e3f06ac..49c567d 100644 --- a/src/lang.rs +++ b/src/lang.rs @@ -104,7 +104,7 @@ impl Language { /// ``` /// # use std::ffi::OsStr; /// # - /// # use orthotypos::lang::Language; + /// # use typope::lang::Language; /// assert!(Language::from_extension(OsStr::new("rs")).is_some()); /// ``` pub fn from_extension(extension: &OsStr) -> Option<&Self> { @@ -118,7 +118,7 @@ impl Language { /// ``` /// # use std::ffi::OsStr; /// # - /// # use orthotypos::lang::Language; + /// # use typope::lang::Language; /// let rust = Language::from_extension(OsStr::new("rs")).unwrap(); /// assert_eq!(rust.extensions(), &["rs"]); /// ``` diff --git a/src/lint.rs b/src/lint.rs index 152f4cc..1cf61a2 100644 --- a/src/lint.rs +++ b/src/lint.rs @@ -77,7 +77,7 @@ impl Linter { /// # Example /// /// ```no_run - /// # use orthotypos::lint::Linter; + /// # use typope::lint::Linter; /// # fn main() -> Result<(), Box> { /// let Some(mut linter) = Linter::from_path("file.rs")? else { return Ok(()); }; /// for typo in linter.iter() { @@ -219,7 +219,7 @@ mod tests { let typo = typos.pop().unwrap(); assert_eq!( format!("{}", typo.code().unwrap()), - "orthotypos::space-before-punctuation-mark" + "typope::space-before-punctuation-mark" ); assert_eq!(typo.span(), (141, 1).into()); } @@ -243,7 +243,7 @@ mod tests { let report: miette::Report = typo.into(); assert_eq!( format!("{}", report.code().unwrap()), - "orthotypos::space-before-punctuation-mark" + "typope::space-before-punctuation-mark" ); assert_eq!( report.labels().unwrap().collect::>(), @@ -283,7 +283,7 @@ mod tests { let typo = typos.pop().unwrap(); assert_eq!( format!("{}", typo.code().unwrap()), - "orthotypos::space-before-punctuation-mark" + "typope::space-before-punctuation-mark" ); assert_eq!(typo.span(), (141, 1).into()); } diff --git a/src/lint/space_before.rs b/src/lint/space_before.rs index 6eeb67f..50a2219 100644 --- a/src/lint/space_before.rs +++ b/src/lint/space_before.rs @@ -26,7 +26,7 @@ use super::{Rule, Typo}; /// - `here is a list of things :`, should be `here is a list of things:` #[derive(Error, Debug, Diagnostic)] #[error("In English typography there is no space before a punctuation mark")] -#[diagnostic(code("orthotypos::space-before-punctuation-mark"), url(docsrs))] +#[diagnostic(code("typope::space-before-punctuation-mark"), url(docsrs))] pub struct TypoSpaceBeforePunctuationMarks { #[source_code] src: Option,