Skip to content

Commit

Permalink
chore: rename the package to typope
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnychevalier committed Aug 2, 2024
1 parent 82c4bda commit f673ab5
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 44 deletions.
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.**

Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand All @@ -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"]);
/// ```
Expand Down
8 changes: 4 additions & 4 deletions src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Linter {
/// # Example
///
/// ```no_run
/// # use orthotypos::lint::Linter;
/// # use typope::lint::Linter;
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
/// let Some(mut linter) = Linter::from_path("file.rs")? else { return Ok(()); };
/// for typo in linter.iter() {
Expand Down Expand Up @@ -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());
}
Expand All @@ -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::<Vec<_>>(),
Expand Down Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/lint/space_before.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<SharedSource>,
Expand Down

0 comments on commit f673ab5

Please sign in to comment.