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

Demonstrate markdown lint errors #6481

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 28 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
# Change to specific Rust release to pin
rust_stable: stable
rust_nightly: nightly-2023-10-21
rust_clippy: '1.77'
rust_clippy: "1.77"
# When updating this, also update:
# - README.md
# - tokio/README.md
Expand All @@ -25,7 +25,7 @@ env:
# - tokio-util/Cargo.toml
# - tokio-test/Cargo.toml
# - tokio-stream/Cargo.toml
rust_min: '1.63'
rust_min: "1.63"

defaults:
run:
Expand Down Expand Up @@ -59,6 +59,7 @@ jobs:
- minrust
- minimal-versions
- fmt
- markdown-lint
- clippy
- docs
- loom-compile
Expand All @@ -82,6 +83,7 @@ jobs:
needs:
- clippy
- fmt
- markdown-lint
- docs
- minrust
steps:
Expand All @@ -102,7 +104,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -164,7 +166,7 @@ jobs:
- name: Install Rust ${{ env.rust_nightly }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_nightly }}
toolchain: ${{ env.rust_nightly }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
Expand All @@ -176,7 +178,7 @@ jobs:
run: |
set -euxo pipefail
RUSTFLAGS="$RUSTFLAGS -C panic=abort -Zpanic-abort-tests" cargo nextest run --workspace --exclude tokio-macros --exclude tests-build --all-features --tests

test-integration-tests-per-feature:
needs: basics
name: Run integration tests for each feature
Expand All @@ -192,7 +194,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}
- name: Install cargo-hack
uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -232,7 +234,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}

- name: Enable parking_lot send_guard feature
# Inserts the line "plsend = ["parking_lot/send_guard"]" right after [features]
Expand Down Expand Up @@ -279,7 +281,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}

- name: Install Valgrind
uses: taiki-e/install-action@valgrind
Expand Down Expand Up @@ -318,7 +320,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}

- name: Install cargo-nextest
uses: taiki-e/install-action@v2
Expand Down Expand Up @@ -352,7 +354,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}

- name: Install cargo-nextest
uses: taiki-e/install-action@v2
Expand Down Expand Up @@ -386,7 +388,7 @@ jobs:
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
toolchain: ${{ env.rust_stable }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -536,7 +538,7 @@ jobs:
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
qemu: '7.2'
qemu: "7.2"

- uses: Swatinem/rust-cache@v2
- name: Tests run with all features (including parking_lot)
Expand Down Expand Up @@ -576,7 +578,7 @@ jobs:
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
qemu: '7.2'
qemu: "7.2"

- name: Remove `parking_lot` from `full` feature
run: sed -i '0,/parking_lot/{/parking_lot/d;}' tokio/Cargo.toml
Expand Down Expand Up @@ -613,7 +615,7 @@ jobs:
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: i686-unknown-linux-gnu
qemu: '7.2'
qemu: "7.2"

- uses: Swatinem/rust-cache@v2
- name: test tokio --all-features
Expand Down Expand Up @@ -660,7 +662,10 @@ jobs:
# Try with unstable feature flags
- { name: "--unstable", rustflags: "--cfg tokio_unstable -Dwarnings" }
# Try with unstable and taskdump feature flags
- { name: "--unstable --taskdump", rustflags: "--cfg tokio_unstable -Dwarnings --cfg tokio_taskdump" }
- {
name: "--unstable --taskdump",
rustflags: "--cfg tokio_unstable -Dwarnings --cfg tokio_taskdump",
}
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.rust_nightly }}
Expand Down Expand Up @@ -745,6 +750,13 @@ jobs:
exit 1
fi

markdown-lint:
name: markdown-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v16

clippy:
name: clippy
runs-on: ubuntu-latest
Expand Down Expand Up @@ -1028,4 +1040,3 @@ jobs:
sed '1d; $d' spellcheck.dic | LC_ALL=en_US.UTF8 sort -uc
- name: Run cargo-spellcheck
run: cargo spellcheck --code 1

2 changes: 2 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line-length:
line_length: 100
8 changes: 6 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Code of Conduct

The Tokio project adheres to the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). This describes the minimum behavior expected from all contributors.
The Tokio project adheres to the [Rust Code of Conduct][code-of-conduct]. This describes the minimum
behavior expected from all contributors.

## Enforcement

Instances of violations of the Code of Conduct can be reported by contacting the project team at [moderation@tokio.rs](mailto:moderation@tokio.rs).
Instances of violations of the Code of Conduct can be reported by contacting the project team at
[moderation@tokio.rs](mailto:moderation@tokio.rs).

[code-of-conduct]: https://www.rust-lang.org/policies/code-of-conduct