Check and fix typos

This commit is contained in:
oxalica
2025-06-13 02:30:38 -04:00
parent 89e5a4e61e
commit 9e4cccb088
7 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
//! Liveness check of names.
//! It locates uncessary or inaccessible bindings and expressions, based on name resolution.
//! It locates unnecessary or inaccessible bindings and expressions, based on name resolution.
//!
//! Our goals are,
//! - Applicable.

View File

@@ -101,7 +101,7 @@ fn source_root_referrer_graph(
db: &dyn DefDatabase,
sid: SourceRootId,
) -> Arc<HashMap<FileId, ModuleReferrers>> {
// Assert our inline threshould costs no extra memory.
// Assert our inline threshold costs no extra memory.
const _: [(); std::mem::size_of::<Vec<FileId>>()] =
[(); std::mem::size_of::<ModuleReferrers>()];

View File

@@ -127,7 +127,7 @@ impl Fixture {
let target = VfsPath::new(target);
flake_info.input_store_paths.insert(name.into(), target);
} else {
bail!("Unknow property {prop}");
bail!("Unknown property {prop}");
}
}
} else if iter.next().is_some() {

View File

@@ -118,14 +118,14 @@ fn main() {
fn main_diagnostics(args: DiagnosticsArgs) {
let ret = emit_diagnostics_for_files(&args.paths);
let fail_threshould = if args.deny_warnings {
let fail_threshold = if args.deny_warnings {
Severity::Warning
} else {
Severity::Error
};
match ret {
Ok(Some(severity)) if severity >= fail_threshould => process::exit(1),
Ok(Some(severity)) if severity >= fail_threshold => process::exit(1),
Ok(_) => {}
Err(err) => {
eprintln!("{err:#}");

View File

@@ -41,7 +41,10 @@
# mismatch.
# If you do want a locked one, use `devShells.full` below.
fd # Used by pre-push
# Used by pre-push
fd
typos
nodejs
watchman # Required by coc.nvim for file watching.

View File

@@ -1,12 +1,15 @@
#!/usr/bin/env bash
set -eu
# Requires: [ git nixfmt-rfc-style fd ], rust toolchain, npm toolchain
# Requires: [ git nixfmt-rfc-style fd typos ], rust toolchain, npm toolchain
die() { echo "$*" >&2; exit 1; }
if git_dir="$(git rev-parse --show-toplevel)"; then
cd "$git_dir"
fi
typos || die "typos"
cargo fmt --all --check \
|| die 'cargo fmt failed'
fd -e nix --exclude=crates/syntax/test_data --exec-batch nixfmt --check \

View File

@@ -4,6 +4,7 @@ extend-exclude = [
]
[default.extend-words]
typ = "typ" # Uncollide keyword `type`.
froms = "froms"
regist = "regist" # coc.nvim `registLanguageClient`
withs = "withs"