Skip to content

Commit 6445c7b

Browse files
committed
fix: try to make the workflows run
1 parent 58be290 commit 6445c7b

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

harper-cli/src/bin/lang_stats.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn analyze_german(args: &Args) {
158158
}
159159

160160
let mut sorted: Vec<_> = annotation_counts.into_iter().collect();
161-
sorted.sort_by(|a, b| b.1.cmp(&a.1));
161+
sorted.sort_by_key(|b| std::cmp::Reverse(b.1));
162162
println!("\nAnnotation Types:");
163163
for (annotation, count) in &sorted {
164164
println!(" {}: {} words", annotation, count);
@@ -228,7 +228,7 @@ fn count_english_annotations() -> (usize, Vec<(String, usize)>) {
228228
annotation_counts.insert("Adverb".to_string(), 3000);
229229

230230
let mut sorted: Vec<_> = annotation_counts.into_iter().collect();
231-
sorted.sort_by(|a, b| b.1.cmp(&a.1));
231+
sorted.sort_by_key(|b| std::cmp::Reverse(b.1));
232232

233233
(48000, sorted)
234234
}
@@ -241,7 +241,7 @@ fn count_portuguese_annotations() -> (usize, Vec<(String, usize)>) {
241241
annotation_counts.insert("Adjective".to_string(), 3000);
242242

243243
let mut sorted: Vec<_> = annotation_counts.into_iter().collect();
244-
sorted.sort_by(|a, b| b.1.cmp(&a.1));
244+
sorted.sort_by_key(|b| std::cmp::Reverse(b.1));
245245

246246
(16000, sorted)
247247
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//! German spell checking support.
22
3-
pub use self::german_dict::{annotated_german_dictionary, curated_german_dictionary, german_dictionary, mutable_german_dictionary};
3+
pub use self::german_dict::{
4+
annotated_german_dictionary, curated_german_dictionary, german_dictionary,
5+
mutable_german_dictionary,
6+
};
47

58
pub mod german_dict;

harper-ls/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ futures = "0.3.32"
3434
serde = { version = "1.0.228", features = ["derive"] }
3535
globset = "0.4.18"
3636
harper-ink = { version = "2.0.0", path = "../harper-ink" }
37+
harper-git-commit = { path = "../harper-git-commit", version = "2.0.0" }
3738

3839
[lib]
3940
name = "harper_ls"

harper-ls/src/backend.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::sync::Arc;
66

77
use crate::config::Config;
88
use crate::document_state::DocumentState;
9-
use crate::git_commit_parser::GitCommitParser;
109
use crate::ignored_lints_io::{load_ignored_lints, save_ignored_lints};
1110
use crate::io_utils::fileify_path;
1211
use anyhow::{Context, Result, anyhow};
@@ -20,6 +19,7 @@ use harper_core::parsers::{CollapseIdentifiers, IsolateEnglish, Parser};
2019
use harper_core::spell::{Dictionary, FstDictionary, MergedDictionary, MutableDictionary};
2120
use harper_core::{DictWordMetadata, Document, IgnoredLints};
2221
use harper_dictionary_wordlist::{load_dict, save_dict};
22+
use harper_git_commit::GitCommitParser;
2323
use harper_html::HtmlParser;
2424
use harper_ink::InkParser;
2525
use harper_jjdescription::JJDescriptionParser;
@@ -568,7 +568,7 @@ impl Backend {
568568
}
569569
}
570570
"git-commit" | "gitcommit" | "octo" => {
571-
Some(Box::new(GitCommitParser::new_markdown(markdown_options)))
571+
Some(Box::new(GitCommitParser::new(markdown_options)))
572572
}
573573
"html" => Some(Box::new(HtmlParser::default())),
574574
"asciidoc" => Some(Box::new(AsciidocParser::default())),

0 commit comments

Comments
 (0)