Skip to content

Commit

Permalink
Merge branch 'master' into all-repeated
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Nov 23, 2024
2 parents ef6babf + c26c129 commit aaa702f
Show file tree
Hide file tree
Showing 67 changed files with 1,480 additions and 527 deletions.
110 changes: 74 additions & 36 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ members = [ "harper-cli", "harper-core", "harper-ls", "harper-comments", "harper
resolver = "2"

[profile.release]
opt-level = 3
opt-level = 3
strip = true
6 changes: 3 additions & 3 deletions harper-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ publish = false
repository = "https://github.com/elijah-potter/harper"

[dependencies]
anyhow = "1.0.92"
anyhow = "1.0.93"
ariadne = "0.4.1"
clap = { version = "4.5.20", features = ["derive"] }
clap = { version = "4.5.21", features = ["derive"] }
harper-core = { path = "../harper-core", version = "0.12.0" }
harper-comments = { path = "../harper-comments", version = "0.12.0" }
serde_json = "1.0.132"
serde_json = "1.0.133"
6 changes: 3 additions & 3 deletions harper-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use clap::Parser;
use harper_comments::CommentParser;
use harper_core::linting::{LintGroup, LintGroupConfig, Linter};
use harper_core::parsers::Markdown;
use harper_core::{remove_overlaps, Dictionary, Document, FullDictionary};
use harper_core::{remove_overlaps, Dictionary, Document, FstDictionary};

#[derive(Debug, Parser)]
enum Args {
Expand Down Expand Up @@ -37,7 +37,7 @@ fn main() -> anyhow::Result<()> {
Args::Lint { file, count } => {
let (doc, source) = load_file(&file)?;

let mut linter = LintGroup::new(LintGroupConfig::default(), FullDictionary::curated());
let mut linter = LintGroup::new(LintGroupConfig::default(), FstDictionary::curated());
let mut lints = linter.lint(&doc);

if count {
Expand Down Expand Up @@ -85,7 +85,7 @@ fn main() -> anyhow::Result<()> {
Ok(())
}
Args::Words => {
let dict = FullDictionary::curated();
let dict = FstDictionary::curated();

let mut word_str = String::new();

Expand Down
6 changes: 3 additions & 3 deletions harper-comments/src/comment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl CommentParser {
"csharp" => tree_sitter_c_sharp::language(),
"toml" => tree_sitter_toml::language(),
"lua" => tree_sitter_lua::language(),
"sh" => tree_sitter_bash::language(),
"shellscript" => tree_sitter_bash::language(),
"java" => tree_sitter_java::language(),
_ => return None,
};
Expand Down Expand Up @@ -82,8 +82,8 @@ impl CommentParser {
"cs" => "csharp",
"toml" => "toml",
"lua" => "lua",
"sh" => "sh",
"bash" => "sh",
"sh" => "shellscript",
"bash" => "shellscript",
"java" => "java",
_ => return None,
})
Expand Down
4 changes: 2 additions & 2 deletions harper-comments/tests/language_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::Path;

use harper_comments::CommentParser;
use harper_core::linting::{LintGroup, LintGroupConfig, Linter};
use harper_core::{Document, FullDictionary};
use harper_core::{Document, FstDictionary};

/// Creates a unit test checking that the linting of a source file in
/// `language_support_sources` produces the expected number of lints.
Expand All @@ -21,7 +21,7 @@ macro_rules! create_test {
);

let mut parser = CommentParser::new_from_filename(Path::new(filename)).unwrap();
let dict = FullDictionary::curated();
let dict = FstDictionary::curated();
let document = Document::new(&source, &mut parser, &dict);

let mut linter = LintGroup::new(
Expand Down
9 changes: 6 additions & 3 deletions harper-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ repository = "https://github.com/elijah-potter/harper"

[dependencies]
blanket = "0.4.0"
hashbrown = { version = "0.15.0", features = ["serde"] }
fst = "0.4.7"
hashbrown = { version = "0.15.1", features = ["serde"] }
is-macro = "0.3.6"
itertools = "0.13.0"
lazy_static = "1.5.0"
ordered-float = { version = "4.5.0", features = ["serde"] }
paste = "1.0.14"
pulldown-cmark = "0.12.2"
serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.132"
serde_json = "1.0.133"
smallvec = { version = "1.13.2", features = ["serde"] }
thiserror = "1.0.67"
thiserror = "2.0.3"
unicode-blocks = "0.1.9"
unicode-width = "0.2.0"
levenshtein_automata = { version = "0.2.1", features = ["fst_automaton"] }

[dev-dependencies]
criterion = { version = "0.5.1", default-features = false }
Expand Down
Loading

0 comments on commit aaa702f

Please sign in to comment.