mirror of
https://github.com/oxalica/nil.git
synced 2025-10-05 16:22:44 +02:00
Check and fix typos
This commit is contained in:
@@ -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.
|
||||
|
@@ -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>()];
|
||||
|
||||
|
@@ -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() {
|
||||
|
@@ -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:#}");
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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 \
|
||||
|
@@ -4,6 +4,7 @@ extend-exclude = [
|
||||
]
|
||||
|
||||
[default.extend-words]
|
||||
typ = "typ" # Uncollide keyword `type`.
|
||||
froms = "froms"
|
||||
regist = "regist" # coc.nvim `registLanguageClient`
|
||||
withs = "withs"
|
||||
|
Reference in New Issue
Block a user