Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check typos from CI #250

Merged
merged 2 commits into from
Jan 15, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Typos
on: [pull_request]

jobs:
run:
name: Spell check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
2 changes: 1 addition & 1 deletion book/src/filter_mutants.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Within this name, your regex can match any substring, including for example:
- The trait, `impl Serialize`
- The struct name, `ScenarioOutcome`
- The function name, `serialize`
- The mutated return value, `with Ok(Defualt::default())`, or any part of it.
- The mutated return value, `with Ok(Default::default())`, or any part of it.

The regex matches a substring, but can be anchored with `^` and `$` to require that
it match the whole name.
Expand Down
2 changes: 1 addition & 1 deletion book/src/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cargo-mutants contains two main categories of code, which are mostly independent

2. Code for finding the modules to mutate and their source files, finding the tree to copy, adjusting paths after it is copied, and finally running builds and tests. This is very Cargo-specific, but should not be too hard to generalize.

The main precondition for supporting Bazel is a realistc test case: preferably an open source Rust tree built with Bazel, or at least a contributor with a Bazel-based Rust tree who is willing to help test and debug and to produce some test cases.
The main precondition for supporting Bazel is a realistic test case: preferably an open source Rust tree built with Bazel, or at least a contributor with a Bazel-based Rust tree who is willing to help test and debug and to produce some test cases.

(See <https://github.com/sourcefrog/cargo-mutants/issues/77> for more discussion.)

Expand Down
2 changes: 1 addition & 1 deletion book/src/shards.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Then, for each mutant in its shard, it does an incremental build and runs all th

Each shard runs the same number of mutants, +/-1. Typically this will mean they each take roughly the same amount of time, although it's possible that some shards are unlucky in drawing mutants that happen to take longer to test.

A rough model for the overall execution time for all of the shards, allowing for this work occuring in parallel, is
A rough model for the overall execution time for all of the shards, allowing for this work occurring in parallel, is

```raw
SHARD_STARTUP + (CLEAN_BUILD + TEST) + (N_MUTANTS/K) * (INCREMENTAL_BUILD + TEST)
Expand Down
2 changes: 1 addition & 1 deletion book/src/timeouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ run the test suite in the unmodified tree, and then sets a timeout for mutated
tests at 5x the time to run tests with no mutations, and a minimum of 20
seconds.

The minimum of 20 seconds can be overriden by the
The minimum of 20 seconds can be overridden by the
`CARGO_MUTANTS_MINIMUM_TEST_TIMEOUT` environment variable, measured in seconds.

You can also set an explicit timeout with the `--timeout` option, also measured
Expand Down
4 changes: 2 additions & 2 deletions src/fnvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ fn path_is_nonzero_unsigned(path: &Path) -> bool {
/// If this is a path ending in `expected_ident`, return the first type argument, ignoring
/// lifetimes.
fn match_first_type_arg<'p>(path: &'p Path, expected_ident: &str) -> Option<&'p Type> {
// TODO: Maybe match only things witn one arg?
// TODO: Maybe match only things with one arg?
let last = path.segments.last()?;
if last.ident == expected_ident {
if let PathArguments::AngleBracketed(AngleBracketedGenericArguments { args, .. }) =
Expand Down Expand Up @@ -610,7 +610,7 @@ mod test {
#[test]
fn unknown_container_replacement() {
// This looks like something that holds a &str, and maybe can be constructed
// from a &str, but we don't know anythig else about it, so we just guess.
// from a &str, but we don't know anything else about it, so we just guess.
check_replacements(
parse_quote! { -> UnknownContainer<'static, str> },
&[],
Expand Down
4 changes: 2 additions & 2 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! knowledge of whether it's running Cargo or potentially something else.
//!
//! On Unix, the subprocess runs as its own process group, so that any
//! grandchild processses are also signalled if it's interrupted.
//! grandchild processes are also signalled if it's interrupted.

use std::ffi::OsString;
use std::io::Read;
Expand Down Expand Up @@ -38,7 +38,7 @@ pub struct Process {
}

impl Process {
/// Run a subprocess to completion, watching for interupts, with a timeout, while
/// Run a subprocess to completion, watching for interrupts, with a timeout, while
/// ticking the progress bar.
pub fn run(
argv: &[String],
Expand Down