-
Notifications
You must be signed in to change notification settings - Fork 1
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
Follow rerun_template
#2
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8629942
Add Cargo.lock to git
emilk 9ce4094
Add `Cargo.lock` to `.gitattributes`
emilk 5a25046
Add `.typos.toml` and fix some typos
emilk c474138
Add typos CI step
emilk 7b6296e
Add link checker to CI
emilk 0e29d16
Add a PR template
emilk ff3c267
Add a label checker CI step
emilk 7137b61
Use rust CI step from rerun_template
emilk b1b358f
Sort dependencies
emilk 4b89b09
Update `Cargo.toml`
emilk d3463b3
Add a rust-toolchain
emilk 51a9b19
Add cargo deny.toml
emilk 7aa36bf
Add code of conduct
emilk 6e6818d
Update .gitignore
emilk d555b3d
Add changelog generator
emilk 86927f3
Add script to update from rerun_template
emilk 36ece63
`cargo clippy --fix`
emilk 5e07986
Add clippy.toml
emilk b51d271
Add back some implicit lifetimes
emilk 228e2fc
Use `.expect()` when failing to convert to JSON
emilk c109d2b
Use `.to_owned()`
emilk daa9062
Some manual clippy fixes
emilk 7c95787
Add clippy lints to Cargo.toml
emilk 2d0ff94
Remove some `unwrap`s
emilk 6b8aae7
Ignore dead code in tests
emilk ca460af
QuickTime is a valid word
emilk f753aff
Remove dead links
emilk 43e6f31
Remove an `unwrap`
emilk a5414ea
allow `unwrap_used` in a place where it is fine to do so
emilk 6926080
Enable `clippy::iter_over_hash_type`
emilk f5e4a2b
Add some vertical spacing
emilk baaa2e8
Fix typos
emilk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto eol=lf | ||
Cargo.lock linguist-generated=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- | ||
* Keep your PR:s small and focused. | ||
* The PR title is what ends up in the changelog, so make it descriptive! | ||
* If applicable, add a screenshot or gif. | ||
* Do NOT open PR:s from your `main` branch, as that makes it hard for maintainers to test and add commits to your PR. | ||
* Remember to run `cargo fmt` and `cargo clippy`. | ||
* Open the PR as a draft until you have self-reviewed it and it passes CI. | ||
* When you have addressed a PR comment, mark it as resolved. | ||
|
||
Please be patient! | ||
--> | ||
|
||
* Closes #ISSUE_NUMBER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
|
||
# https://github.com/marketplace/actions/require-labels | ||
# Check for existence of labels | ||
# See all our labels at https://github.com/rerun-io/rerun/issues/labels | ||
|
||
name: PR Labels | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for a "do-not-merge" label | ||
uses: mheap/github-action-required-labels@v3 | ||
with: | ||
mode: exactly | ||
count: 0 | ||
labels: "do-not-merge" | ||
|
||
- name: Require label "include in changelog" or "exclude from changelog" | ||
uses: mheap/github-action-required-labels@v3 | ||
with: | ||
mode: minimum | ||
count: 1 | ||
labels: "exclude from changelog, include in changelog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
|
||
name: Link checker | ||
|
||
jobs: | ||
link-checker: | ||
name: Check links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Restore link checker cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
|
||
# Check https://github.com/lycheeverse/lychee on how to run locally. | ||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v1.9.0 | ||
with: | ||
fail: true | ||
lycheeVersion: "0.14.3" | ||
# When given a directory, lychee checks only markdown, html and text files, everything else we have to glob in manually. | ||
args: | | ||
--base . --cache --max-cache-age 1d . "**/*.rs" "**/*.toml" "**/*.hpp" "**/*.cpp" "**/CMakeLists.txt" "**/*.py" "**/*.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,131 @@ | ||
name: Rust | ||
|
||
# Copied from https://github.com/rerun-io/rerun_template | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: [ master ] | ||
types: [ opened, synchronize ] | ||
|
||
name: Rust | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
|
||
jobs: | ||
build: | ||
rust-check: | ||
name: Rust | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
profile: default | ||
toolchain: 1.76.0 | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Setup rust smart caching | ||
uses: Swatinem/rust-cache@v1.3.0 | ||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Cargo fmt | ||
- name: Rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Cargo clippy | ||
- name: check --all-features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --no-deps -- -D warnings | ||
|
||
- name: Cargo build | ||
command: check | ||
args: --all-features --all-targets | ||
|
||
- name: check default features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all-targets | ||
|
||
- name: check --no-default-features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
|
||
- name: Cargo test | ||
command: check | ||
args: --no-default-features --lib --all-targets | ||
|
||
- name: Test doc-tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --doc --all-features | ||
|
||
- name: cargo doc --lib | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --lib --no-deps --all-features | ||
|
||
- name: cargo doc --document-private-items | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --document-private-items --no-deps --all-features | ||
|
||
- name: Build tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-run | ||
|
||
- name: Run test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features | ||
|
||
- name: Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets --all-features -- -D warnings | ||
|
||
# --------------------------------------------------------------------------- | ||
|
||
check_wasm: | ||
name: Check wasm32 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.76.0 | ||
target: wasm32-unknown-unknown | ||
override: true | ||
components: clippy | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check wasm32 | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --target wasm32-unknown-unknown --lib | ||
|
||
- name: Clippy wasm32 | ||
env: | ||
CLIPPY_CONF_DIR: "scripts/clippy_wasm" # Use scripts/clippy_wasm/clippy.toml | ||
run: cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings | ||
|
||
# --------------------------------------------------------------------------- | ||
|
||
cargo-deny: | ||
name: Check Rust dependencies (cargo-deny) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
rust-version: "1.76.0" | ||
log-level: warn | ||
command: check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
|
||
# https://github.com/crate-ci/typos | ||
# Add exceptions to `.typos.toml` | ||
# install and run locally: cargo install typos-cli && typos | ||
|
||
name: Spell Check | ||
on: [pull_request] | ||
|
||
jobs: | ||
run: | ||
name: Spell Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check spelling of entire workspace | ||
uses: crate-ci/typos@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
/Cargo.lock | ||
/target | ||
**/*.rs.bk | ||
*.exe | ||
*.pdb | ||
*.mp4 | ||
.idea/ | ||
.vscode/ | ||
!tests/samples/*.mp4 | ||
# Mac stuff: | ||
.DS_Store | ||
|
||
# Rust compile target directories: | ||
target | ||
target_ra | ||
target_wasm | ||
|
||
# https://github.com/lycheeverse/lychee | ||
.lycheecache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# https://github.com/crate-ci/typos | ||
# install: cargo install typos-cli | ||
# run: typos | ||
|
||
[default.extend-words] | ||
# There are some weird words in this repository: | ||
alignement = "alignement" | ||
ALS = "ALS" | ||
alst = "alst" | ||
CLL = "CLL" | ||
fiel = "fiel" | ||
intialization = "intialization" | ||
numer = "numer" | ||
trak = "trak" | ||
trun = "trun" | ||
truns = "truns" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm you're sure about this? Some of those looks like straight up typos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am in fact not sure, but I fixed all the typos I dared fix 😅