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

Add CI for spell checking and fix spelling mistakes #1041

Merged
merged 1 commit into from
Jul 18, 2021

Conversation

Gelbpunkt
Copy link
Member

@Gelbpunkt Gelbpunkt commented Jul 17, 2021

This uses codespell to verify the docs won't have spelling mistakes. While I was on it, all errors that it found were fixed. The action used is the official codespell action that features line annotations for issues found.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@Gelbpunkt Gelbpunkt added c-all Affects all crates or the project as a whole t-enhancement t-ci Anything to do with CI. labels Jul 17, 2021
@zeylahellyer zeylahellyer merged commit c8fa64c into twilight-rs:next Jul 18, 2021
@zeylahellyer
Copy link
Member

Thanks!

7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jul 25, 2021
Add a GitHub Actions workflow for spellchecking via [codespell]. This
verifies that documentation and strings don't have typos, but skips
checking code itself. The [GitHub Action] in use features line
annotations for issues found.

[GitHub Action]: https://github.com/codespell-project/actions-codespell
[codespell]: https://github.com/codespell-project/codespell
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jul 25, 2021
Add a GitHub Actions workflow for spellchecking via [codespell]. This
verifies that documentation and strings don't have typos, but skips
checking code itself. The [GitHub Action] in use features line
annotations for issues found.

[GitHub Action]: https://github.com/codespell-project/actions-codespell
[codespell]: https://github.com/codespell-project/codespell
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jul 31, 2021
Add a GitHub Actions workflow for spellchecking via [codespell]. This
verifies that documentation and strings don't have typos, but skips
checking code itself. The [GitHub Action] in use features line
annotations for issues found.

[GitHub Action]: https://github.com/codespell-project/actions-codespell
[codespell]: https://github.com/codespell-project/codespell
7596ff added a commit that referenced this pull request Jul 31, 2021
Changes

Remove the deprecated method `InMemoryCache::user_ref`, as it was
mistakenly left in during testing ([@7596ff]).

Remove the deprecated field `CachedMember::stickers` as it is no longer
in use by Discord ([@7596ff]).

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

[#1041]: #1041

[@7596ff]: https://github.com/7596ff
[@Gelbpunkt]: https://github.com/Gelbpunkt
7596ff added a commit that referenced this pull request Jul 31, 2021
Enhancements

The `tracing` feature is now optional ([#986] - [@zeylahellyer]).

Changes

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

Fixes

When calling `Shard::shutdown`, `Shard::shutdown_resumable`,
`Cluster::down`, or `Cluster::down_resumable`, shards would be stopped
but the events stream returned by shards and clusters wouldn't return
`None`. This is due to the events stream containing a receiver of
events, while shard processors contained a sender. However, shards would
keep a copy of the sender, so while the shard processor would be aborted
and its sender dropped the shard's would not be dropped.

To fix this we can move the sender into shard processors. When the
shard processor is dropped so will the only sender. However, individual
shard instances will now only be able to be started the first time;
`Shard::start` can no longer be called multiple times. If a user shuts
down a shard and wants to start it again they will need to create a new
shard instance.

([#1070] - [@zeylahellyer]).

[#986]: #986
[#1041]: #1041
[#1070]: #1070

[@Gelbpunkt]: https://github.com/Gelbpunkt
[@zeylahellyer]: https://github.com/zeylahellyer
7596ff added a commit that referenced this pull request Jul 31, 2021
Enhancements

Many functions have been made constant ([#1010] - [@zeylahellyer]).

Changes

There are significant changes to how users make HTTP requests. When
users make a request, they must pass borrowed types instead of owned
types. To execute the request, users must call `exec` on the request
builder. Once the request has completed execution, users may use the
`ResponseFuture` struct methods to access the status code of the
request. To access a returned model, if there is one, users must call
`model` on the response.

A call to `Client::create_message` like this:

```rust
client.create_message(ChannelId(1))
    .content("some content")?
    .embed(Embed {})?
    .await?;
```

is now written like this:

```rust
client.create_message(ChannelId(1))
    .content(&"some conntent")?
    .embeds(&[&Embed {}])?
    .exec()
    .await?
    .model()
    .await?;
```

For more information on the motivation behind these changes, see the PR
descriptions of [#923], [#1008], and [#1009]. These changes were
authored by [@zeylahellyer].

Rename `ErrorCode::UnallowedWordsForPublicStage` variant to
`UnallowedWords` ([#956] - [@7596ff])

`CreateGlobalCommand`, `CreateGuildCommand`, `SetGlobalCommands`, and
`SetGuildCommands` now return command(s) ([#1037] - [@vilgotf]).

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

[#923]: #923
[#956]: #956
[#1008]: #1008
[#1009]: #1009
[#1010]: #1010
[#1037]: #1037
[#1041]: #1041

[@7596ff]: https://github.com/7596ff
[@Gelbpunkt]: https://github.com/Gelbpunkt
[@vilgotf]: https://github.com/vilgotf
[@zeylahellyer]: https://github.com/zeylahellyer
7596ff added a commit that referenced this pull request Jul 31, 2021
Changes

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

[#1041]: #1041

[@Gelbpunkt]: https://github.com/Gelbpunkt
7596ff added a commit that referenced this pull request Jul 31, 2021
Enhancements

Fully support audit logs by creating types for Audit Log Changes and
updating Audit Log Change Keys with new variants. Changes were generic
`serde_value::Value`s, which provide no typed information. There are now
variants with typed `new` and `old` values - checked against the API -
which may or may not both always be present, or never.

The `twilight_model::guild::audit_log` module is now entirely documented
and tested as well. This has been manually tested by creating as many
different audit log changes as could be created in the API and then
deserializing the past 100 entries.

([#1022] - [@zeylahellyer]).

Changes

Rename the `GuildCreate` audit log event to `GuildUpdate` ([#966] -
[@zeylahellyer]).

A few spelling errors have been fixed by adding the `codespell` Action
([#1041] - [@Gelbpunkt].

Fixes

`PartialApplication` now uses `ApplicationFlags` instead of `UserFlags` ([#1072] - [@A5rocks]).

[#966]: #966
[#1022]: #1022
[#1041]: #1041
[#1072]: #1072

[@A5rocks]: https://github.com/A5rocks
[@Gelbpunkt]: https://github.com/Gelbpunkt
[@zeylahellyer]: https://github.com/zeylahellyer
Erk- pushed a commit to Erk-/twilight that referenced this pull request Aug 9, 2021
Add a GitHub Actions workflow for spellchecking via [codespell]. This
verifies that documentation and strings don't have typos, but skips
checking code itself. The [GitHub Action] in use features line
annotations for issues found.

[GitHub Action]: https://github.com/codespell-project/actions-codespell
[codespell]: https://github.com/codespell-project/codespell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-all Affects all crates or the project as a whole t-ci Anything to do with CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants