Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .codespellrc

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ jobs:
cache-on-failure: true
- run: cargo test --workspace --doc

codespell:
typos:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
skip: "*.json"
- uses: crate-ci/typos@v1

clippy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -120,7 +118,7 @@ jobs:
- nextest
- docs
- doctest
- codespell
- typos
- clippy
- rustfmt
- forge-fmt
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ lint-clippy: ## Run clippy on the codebase.
--all-features \
-- -D warnings

.PHONY: lint-codespell
lint-codespell: ## Run codespell on the codebase.
@command -v codespell >/dev/null || { \
echo "codespell not found. Please install it by running the command `pipx install codespell` or refer to the following link for more information: https://github.com/codespell-project/codespell" \
.PHONY: lint-typos
lint-typos: ## Run typos on the codebase.
@command -v typos >/dev/null || { \
echo "typos not found. Please install it by running the command `cargo install typos-cli` or refer to the following link for more information: https://github.com/crate-ci/typos" \
exit 1; \
}
codespell --skip "*.json"
typos

.PHONY: lint
lint: ## Run all linters.
make fmt && \
make lint-clippy && \
make lint-codespell
make lint-typos

##@ Other

Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ ignore them in the `.gitignore` file."
/// If the status is prefix with `-`, the submodule is not initialized.
///
/// Ref: <https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt-status--cached--recursive--ltpathgt82308203>
pub fn submodules_unintialized(self) -> Result<bool> {
pub fn submodules_uninitialized(self) -> Result<bool> {
self.cmd()
.args(["submodule", "status"])
.get_stdout_lossy()
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/src/cmd/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl DependencyInstallOpts {
// Check if submodules are uninitialized, if so, we need to fetch all submodules
// This is to ensure that foundry.lock syncs successfully and doesn't error out, when
// looking for commits/tags in submodules
if git.submodules_unintialized()? {
if git.submodules_uninitialized()? {
trace!(lib = %libs.display(), "submodules uninitialized");
git.submodule_update(false, false, false, true, Some(&libs))?;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/src/cmd/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl UpdateArgs {
foundry_lock.iter_mut().for_each(|(_path, dep_id)| {
// Set r#override flag to true if the dep is a branch
if let DepIdentifier::Branch { .. } = dep_id {
dep_id.mark_overide();
dep_id.mark_override();
}
});
} else {
Expand Down
6 changes: 3 additions & 3 deletions crates/forge/src/lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl<'a> Lockfile<'a> {
.deps
.get_mut(dep)
.map(|d| {
new_dep_id.mark_overide();
new_dep_id.mark_override();
std::mem::replace(d, new_dep_id)
})
.ok_or_eyre(format!("Dependency not found in lockfile: {}", dep.display()))?;
Expand Down Expand Up @@ -232,7 +232,7 @@ pub enum DepIdentifier {
/// Release tag `name` and the `rev` it is currently pointing to.
/// Running `forge update` does not update the tag/rev.
/// Dependency will remain pinned to the existing tag/rev unless r#override like so `forge
/// update owner/dep@tag=diffent_tag`.
/// update owner/dep@tag=different_tag`.
#[serde(rename = "tag")]
Tag {
name: String,
Expand Down Expand Up @@ -304,7 +304,7 @@ impl DepIdentifier {
}

/// Marks as dependency as overridden.
pub fn mark_overide(&mut self) {
pub fn mark_override(&mut self) {
match self {
Self::Branch { r#override, .. } => *r#override = true,
Self::Tag { r#override, .. } => *r#override = true,
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/tests/cli/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Installing forge-5980-test in [..] (url: Some("https://github.com/evalir/forge-5
let config = Config {
remappings: vec![
Remapping::from_str("forge-5980-test/=lib/forge-5980-test/src/").unwrap().into(),
// explicit remapping for sub-dependendy seems necessary for some reason
// explicit remapping for sub-dependency seems necessary for some reason
Remapping::from_str(
"forge-5980-test-dep/=lib/forge-5980-test/lib/forge-5980-test-dep/src/",
)
Expand Down
2 changes: 1 addition & 1 deletion crates/lint/src/linter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::inline_config::InlineConfig;
///
/// # Required Methods
///
/// - `init`: Creates a new solar `Session` with the appropiate linter configuration.
/// - `init`: Creates a new solar `Session` with the appropriate linter configuration.
/// - `early_lint`: Scans the source files (using the AST) emitting a diagnostic for lints found.
/// - `late_lint`: Scans the source files (using the HIR) emitting a diagnostic for lints found.
pub trait Linter: Send + Sync + Clone {
Expand Down
22 changes: 22 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[files]
extend-exclude = [
".git",
"target",
"testdata",
"Cargo.toml",
"Cargo.lock",
"*.json",
"**/tests/**",
"**/test/**",
"**/*_test.*",
"**/*_tests.*",
]

[default.extend-words]
crate = "crate"
ser = "ser"
ratatui = "ratatui"
Caf = "Caf"
froms = "froms"
strat = "strat"
ba = "ba"