Skip to content

Commit 8e3c6c5

Browse files
kianmenghawkw
authored andcommitted
docs: fix typos and markdown lints (#369)
Found via these commands: codespell . markdownlint *.md --disable MD013
1 parent 0a6012b commit 8e3c6c5

File tree

4 files changed

+57
-47
lines changed

4 files changed

+57
-47
lines changed

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Code of Conduct
22

3-
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.
3+
The Tokio project adheres to the
4+
[Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
5+
This describes the minimum behavior expected from all contributors.
46

57
## Enforcement
68

7-
Instances of violations of the Code of Conduct can be reported by contacting the project team at [[email protected]](mailto:[email protected]).
9+
Instances of violations of the Code of Conduct can be reported by contacting
10+
the project team at [[email protected]](mailto:[email protected]).

CONTRIBUTING.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
:balloon: Thanks for your help improving the project! We are so happy to have
44
you!
55

6-
There are opportunities to contribute to Tokio at any level. It doesn't matter if
7-
you are just getting started with Rust or are the most weathered expert, we can
8-
use your help.
6+
There are opportunities to contribute to Tokio at any level. It doesn't matter
7+
if you are just getting started with Rust or are the most weathered expert, we
8+
can use your help.
99

1010
**No contribution is too small and all contributions are valued.**
1111

@@ -20,8 +20,8 @@ not covered in this guide, please joinus!
2020
## Conduct
2121

2222
The Tokio project adheres to the [Rust Code of Conduct][coc]. This describes
23-
the _minimum_ behavior expected from all contributors. Instances of violations of the
24-
Code of Conduct can be reported by contacting the project team at
23+
the _minimum_ behavior expected from all contributors. Instances of violations
24+
of the Code of Conduct can be reported by contacting the project team at
2525
2626

2727
[coc]: https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md
@@ -156,7 +156,7 @@ The provided [example application] can be used for testing UI changes:
156156

157157
When opening pull requests that make UI changes, please include one or more
158158
screenshots demonstrating your change! For bug fixes, it is often also useful to
159-
include a screenshot showing the console *prior* to the change, in order to
159+
include a screenshot showing the console _prior_ to the change, in order to
160160
demonstrate the bug that's being fixed.
161161

162162
#### Integration tests
@@ -178,7 +178,7 @@ for a reader to understand and actually testing the API.
178178
The type level example for `tokio_timer::Timeout` provides a good example of a
179179
documentation test:
180180

181-
```
181+
```rust
182182
/// // import the `timeout` function, usually this is done
183183
/// // with `use tokio::prelude::*`
184184
/// use tokio::prelude::FutureExt;
@@ -204,7 +204,7 @@ documentation test:
204204
/// # }
205205
```
206206

207-
Given that this is a *type* level documentation test and the primary way users
207+
Given that this is a _type_ level documentation test and the primary way users
208208
of `tokio` will create an instance of `Timeout` is by using
209209
`FutureExt::timeout`, this is how the documentation test is structured.
210210

@@ -215,7 +215,7 @@ easiest way to execute a future from a test.
215215
If this were a documentation test for the `Timeout::new` function, then the
216216
example would explicitly use `Timeout::new`. For example:
217217

218-
```
218+
```rust
219219
/// use tokio::timer::Timeout;
220220
/// use futures::Future;
221221
/// use futures::sync::oneshot;
@@ -254,7 +254,7 @@ history**. But also, we use the git commit messages to **generate the
254254
change log**.
255255

256256
Since commits are merged by [squashing](#commit-squashing), these rules are not
257-
required for individual commits to a development branch. However, they *are*
257+
required for individual commits to a development branch. However, they _are_
258258
required for the final squash commit to the `main` branch. Generally, the PR
259259
description and title are used as the commit message for the squash commit.
260260
Therefore, please try to follow these rules when writing the description and
@@ -266,7 +266,7 @@ Each commit message consists of a **header**, a **body** and a
266266
**footer**. The header has a special format that includes a **type**,
267267
an (optional) **scope** and a **subject**:
268268

269-
```
269+
```sh
270270
<type>(<scope>): <subject>
271271
<BLANK LINE>
272272
<body>
@@ -284,6 +284,7 @@ which we use to generate changelogs.
284284
[clog]: https://github.com/clog-tool/clog-cli
285285

286286
#### Type
287+
287288
Must be one of the following:
288289

289290
* **feat**: A new feature
@@ -335,7 +336,6 @@ is also the place to reference GitHub issues that this commit
335336
The last line of commits introducing breaking changes should be in the
336337
form `BREAKING CHANGE: <desc>`
337338

338-
339339
### Opening the Pull Request
340340

341341
Open a new pull request using the GitHub web UI. Please try to follow the
@@ -388,7 +388,7 @@ does not land, the submitters should come away from the experience feeling like
388388
their effort was not wasted or unappreciated**. Every Pull Request from a new
389389
contributor is an opportunity to grow the community.
390390

391-
### Review a bit at a time.
391+
### Review a bit at a time
392392

393393
Do not overwhelm new contributors.
394394

@@ -407,7 +407,7 @@ Note that only **incremental** improvement is needed to land a PR. This means
407407
that the PR does not need to be perfect, only better than the status quo. Follow
408408
up PRs may be opened to continue iterating.
409409

410-
When changes are necessary, *request* them, do not *demand* them, and **do not
410+
When changes are necessary, _request_ them, do not _demand_ them, and **do not
411411
assume that the submitter already knows how to add a test or run a benchmark**.
412412

413413
Specific performance optimization techniques, coding styles and conventions
@@ -427,7 +427,7 @@ with the appropriate reason to keep the conversation flow concise and relevant.
427427

428428
### Be aware of the person behind the code
429429

430-
Be aware that *how* you communicate requests and reviews in your feedback can
430+
Be aware that _how_ you communicate requests and reviews in your feedback can
431431
have a significant impact on the success of the Pull Request. Yes, we may land
432432
a particular change that makes Tokio better, but the individual might just not
433433
want to have anything to do with Tokio ever again. The goal is not just having
@@ -440,7 +440,7 @@ check with the contributor to see if they intend to continue the work before
440440
checking if they would mind if you took it over (especially if it just has nits
441441
left). When doing so, it is courteous to give the original contributor credit
442442
for the work they started (either by preserving their name and email address in
443-
the commit log, or by using an `Author: ` meta-data tag in the commit.
443+
the commit log, or by using an `Author:` meta-data tag in the commit.
444444

445445
_Adapted from the [Node.js contributing guide][node]_.
446446

@@ -458,36 +458,35 @@ targeted at maintainers. Most contributors aren't able to set these labels.
458458

459459
The area label describes cross-cutting areas of work on the console project.
460460

461-
- **A-instrumentation**: Related to application instrumentation (such as adding
461+
* **A-instrumentation**: Related to application instrumentation (such as adding
462462
new instrumentation to an async runtime or other library).
463-
- **A-warnings**: Related to warnings displayed in the console CLI. This
463+
* **A-warnings**: Related to warnings displayed in the console CLI. This
464464
includes changes that add new warnings, improve existing warnings, or
465465
improvements to the console's warning system as a whole.
466-
- **A-recording**: Related to recording and playing back console data.
466+
* **A-recording**: Related to recording and playing back console data.
467467

468468
### Crate
469469

470470
The crate label describes what crates in the repository are involved in an issue
471471
or PR.
472472

473-
- **C-api**: Related to the `console-api` crate and/or protobuf definitions.
474-
- **C-console**: Related to the `console` command-line application.
475-
- **C-subscriber**: Related to the `console-subscriber` crate.
473+
* **C-api**: Related to the `console-api` crate and/or protobuf definitions.
474+
* **C-console**: Related to the `console` command-line application.
475+
* **C-subscriber**: Related to the `console-subscriber` crate.
476476

477477
### Effort and calls for participation
478478

479479
The effort label represents a _best guess_ for the approximate amount of effort
480480
that an issue will likely require. These are not always accurate! :)
481481

482-
483-
- **E-easy**: This is relatively easy. These issues are often good for newcomers
482+
* **E-easy**: This is relatively easy. These issues are often good for newcomers
484483
to the project and/or Rust beginners.
485-
- **E-medium**: Medium effort. This issue is expected to be relatively
484+
* **E-medium**: Medium effort. This issue is expected to be relatively
486485
straightforward, but may require a larger amount of work than `E-easy` issues,
487486
or require some design work.
488-
- **E-hard** This either involves very tricky code, is something we don't know
487+
* **E-hard** This either involves very tricky code, is something we don't know
489488
how to solve, or is difficult for some other reason.
490-
- **E-needs-mvce**: This bug is missing a minimal complete and verifiable
489+
* **E-needs-mvce**: This bug is missing a minimal complete and verifiable
491490
example.
492491

493492
The "E-" prefix is the same as used in the Rust compiler repository. Some
@@ -499,14 +498,14 @@ server if you want to know how difficult an issue likely is.
499498
The severity label categorizes what type of issue is described by an issue, or
500499
what is implemented by a pull request.
501500

502-
- **S-bug**: This is a bug in the console. If this label is added to an issue,
501+
* **S-bug**: This is a bug in the console. If this label is added to an issue,
503502
then that issue describes a bug. If this label is added to a pull request,
504-
then this pull request *fixes* a bug.
505-
- **S-feature**: This is adding a new feature.
506-
- **S-performance**: Related to improving performance, either in the
503+
then this pull request _fixes_ a bug.
504+
* **S-feature**: This is adding a new feature.
505+
* **S-performance**: Related to improving performance, either in the
507506
instrumented application or in the `console` CLI. This may be added to
508507
performance regressions that don't result in a crash or incorrect data, as
509508
well as to pull requests that implement optimizations.
510-
- **S-refactor**: This is a refactor. This label describes proposed or
509+
* **S-refactor**: This is a refactor. This label describes proposed or
511510
implemented changes that are related to improve code quality or set up for
512511
future changes, but shouldn't effect behavior, fix bugs, or add new APIs.

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ toolkit consists of multiple components:
3838
[`tracing`].
3939

4040
* tools for **displaying and exploring diagnostic data**, implemented as gRPC
41-
clients using the console wire protocol. the [`tokio-console`] crate implements an
42-
**an interactive command-line tool** that consumes this data, but **other
43-
implementations**, such as graphical or web-based tools, are also possible.
41+
clients using the console wire protocol. the [`tokio-console`] crate
42+
implements an **an interactive command-line tool** that consumes this data,
43+
but **other implementations**, such as graphical or web-based tools, are
44+
also possible.
4445

4546
[gRPC]: https://grpc.io/
4647
[protocol buffers]: https://developers.google.com/protocol-buffers
@@ -58,7 +59,7 @@ viewing details for a single task:
5859

5960
![task details view](https://user-images.githubusercontent.com/2796466/129774524-288c967b-6066-4f98-973d-099b3e6a2c55.png)
6061

61-
## on the shoulders of giants...
62+
## on the shoulders of giants
6263

6364
the console is **part of a much larger effort** to improve debugging tooling for
6465
async Rust. **a [2019 Google Summer of Code project][gsoc] by Matthias Prechtl**
@@ -86,7 +87,9 @@ others.
8687
[Instruments]: https://developer.apple.com/library/archive/documentation/ToolsLanguages/Conceptual/Xcode_Overview/MeasuringPerformance.html
8788
[**@matprec**]: https://github.com/matprec
8889
[**@pnkfelix**]: https://github.com/pnkfelix
90+
8991
## using it
92+
9093
### instrumenting your program
9194

9295
to **instrument an application using Tokio**, add a dependency on the
@@ -101,10 +104,13 @@ notes:
101104

102105
* in order to collect task data from Tokio, **the `tokio_unstable` cfg must be
103106
enabled**. for example, you could build your project with
107+
104108
```shell
105-
$ RUSTFLAGS="--cfg tokio_unstable" cargo build
109+
RUSTFLAGS="--cfg tokio_unstable" cargo build
106110
```
111+
107112
or add the following to your `.cargo/config.toml` file:
113+
108114
```toml
109115
[build]
110116
rustflags = ["--cfg", "tokio_unstable"]
@@ -116,29 +122,29 @@ notes:
116122
* the `tokio` and `runtime` [`tracing` targets] must be enabled at the [`TRACE`
117123
level].
118124

119-
+ if you're using the [`console_subscriber::init()`][init] or
125+
* if you're using the [`console_subscriber::init()`][init] or
120126
[`console_subscriber::Builder`][builder] APIs, these targets are enabled
121127
automatically.
122128

123-
+ if you are manually configuring the `tracing` subscriber using the
129+
* if you are manually configuring the `tracing` subscriber using the
124130
[`EnvFilter`] or [`Targets`] filters from [`tracing-subscriber`], add
125131
`"tokio=trace,runtime=trace"` to your filter configuration.
126132

127-
+ also, ensure you have not enabled any of the [compile time filter
133+
* also, ensure you have not enabled any of the [compile time filter
128134
features][compile_time_filters] in your `Cargo.toml`.
129135

130136
### running the console
131137

132138
to **run the console command-line tool**, install `tokio-console` from [crates.io](https://crates.io/crates/tokio-console)
133139

134140
```shell
135-
$ cargo install --locked tokio-console
141+
cargo install --locked tokio-console
136142
```
137143

138144
and run locally
139145

140146
```shell
141-
$ tokio-console
147+
tokio-console
142148
```
143149

144150
> **alternative method:** run the tool from a local checkout of this repository
@@ -154,14 +160,14 @@ as an argument to the console (either as an `<IP>:<PORT>` or
154160
`<DNS_NAME>:<PORT>`). for example:
155161
156162
```shell
157-
$ cargo run -- http://my.great.console.app.local:5555
163+
cargo run -- http://my.great.console.app.local:5555
158164
```
159165
160166
the console command-line tool supports a number of additional flags to configure
161167
its behavior. the `-h` or `--help` flag will print a list of supported
162168
command-line flags and arguments:
163169
164-
```
170+
```text
165171
USAGE:
166172
tokio-console [FLAGS] [OPTIONS] [TARGET_ADDR]
167173
@@ -240,7 +246,7 @@ OPTIONS:
240246
* `years`, `year`, `y` -- defined as 365.25 days [default: 6s]
241247
```
242248
243-
## for development:
249+
## for development
244250
245251
the `console-subscriber/examples` directory contains **some potentially useful
246252
tools**:

SECURITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Security
2+
13
## Report a security issue
24

35
The Tokio project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [[email protected]](mailto:[email protected]). Security issues should not be reported via the public Github Issue tracker.

0 commit comments

Comments
 (0)