diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4741cf5ca9..11ab0de333 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,7 +16,7 @@ Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) -- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style +- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d6b1b7b9a..102b721dcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: run: cargo fmt --all -- --check - name: Clippy - run: cargo clippy --workspace ${{ matrix.flags }}--exclude nu_plugin_* -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + run: cargo clippy --workspace ${{ matrix.flags }}--exclude nu_plugin_* -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err nu-tests: env: @@ -84,7 +84,7 @@ jobs: std-lib-and-python-virtualenv: env: - NU_LOG_LEVEL: DEBUG + NU_LOG_LEVEL: DEBUG strategy: fail-fast: true @@ -163,7 +163,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1.4.4 - name: Clippy - run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err - name: Tests run: cargo test --profile ci --package nu_plugin_* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2d9cd0097..07e19466d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ The most comprehensive test suite we have is the `nu-test-support` crate. For te - Run Clippy on Nushell: ```shell - cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err ``` or via the `toolkit.nu` command: ```shell @@ -139,7 +139,7 @@ This includes discarded approaches. Also we want to quickly identify regressions ### How we merge PRs -In general the maintainers **squash** all changes of your PR into a single commit when merging. +In general the maintainers **squash** all changes of your PR into a single commit when merging. This keeps a clean enough linear history, while not forcing you to conform to a too strict style while iterating in your PR or fixing small problems. As an added benefit the commits on the `main` branch are tied to the discussion that happened in the PR through their `#1234` issue number. @@ -201,13 +201,13 @@ You can help us to make the review process a smooth experience: - In general, added tests help us to understand which assumptions go into a particular addition/change. - Try to also test corner cases where those assumptions might break. This can be more valuable than simply adding many similar tests. - Commit history inside a PR during code review: - - Good **atomic commits** can help follow larger changes, but we are not pedantic. + - Good **atomic commits** can help follow larger changes, but we are not pedantic. - We don't shame fixup commits while you try to figure out a problem. They can help others see what you tried and what didn't work. (see our [squash policy](#how-we-merge-prs)) - During active review constant **force pushing** just to amend changes can be confusing! - GitHub's UI presents reviewers with less options to compare diffs - fetched branches for experimentation become invalid! - the notification a maintainer receives has a low signal-to-noise ratio - - Git pros *can* use their judgement to rebase/squash to clean up the history *if it aids the understanding* of a larger change during review + - Git pros *can* use their judgement to rebase/squash to clean up the history *if it aids the understanding* of a larger change during review - Merge conflicts: - In general you should take care of resolving merge conflicts. - Use your judgement whether to `git merge main` or to `git rebase main` diff --git a/crates/nu-table/src/types/expanded.rs b/crates/nu-table/src/types/expanded.rs index fc969a98aa..a5a80ca741 100644 --- a/crates/nu-table/src/types/expanded.rs +++ b/crates/nu-table/src/types/expanded.rs @@ -564,7 +564,7 @@ fn value_list_to_string( (buf, TextStyle::default()) } -fn dive_options<'a, 'b>(opts: &'a Options<'b>, span: Span) -> Options<'b> { +fn dive_options<'b>(opts: &Options<'b>, span: Span) -> Options<'b> { let mut opts = opts.clone(); opts.span = span; if let Some(deep) = opts.format.expand_limit.as_mut() { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 94e7b90bb8..37f65d079b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -16,5 +16,5 @@ profile = "default" # use in nushell, we may opt to use the bleeding edge stable version of rust. # I believe rust is on a 6 week release cycle and nushell is on a 3 week release cycle. # So, every two nushell releases, this version number should be bumped by one. -channel = "1.66.1" +channel = "1.67.1" diff --git a/toolkit.nu b/toolkit.nu index 67fd39a703..391cf39bda 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -37,7 +37,7 @@ export def clippy [ } try { - cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err } catch { error make -u { msg: $"\nplease fix the above ('clippy' | pretty-print-command) errors before continuing!" } }