-
Notifications
You must be signed in to change notification settings - Fork 0
chore: improve CI tooling, linting, and code cleanup #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a8e8ff7
some stuff tm
Aderinom c7a7078
clippy fix
Aderinom 2dc9acd
more linting
Aderinom f28c13f
tooling: ci
Aderinom 7fcafcb
cleanup, ci, deny, and more
Aderinom e0f75cb
fix: ci yml
Aderinom 7a72fd1
fix: ci fmt nightly
Aderinom 43f3969
fix: ci the third
Aderinom 36f0c76
cleanup
Aderinom 3e7e842
fix: bug with lazy injection
Aderinom f80d5d4
refactor: cr
Aderinom 6b5fd46
fix: lint
Aderinom 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,39 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
|
|
||
| # Only keep the latest run per branch/PR to save CI minutes. | ||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| rust-all: | ||
| name: Rust (fmt, clippy, test, doc, shear) | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| # Cache compilation output between runs via sccache. | ||
| SCCACHE_GHA_ENABLED: "true" | ||
| RUSTC_WRAPPER: "sccache" | ||
| CARGO_INCREMENTAL: "0" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| # Starts the sccache server used by RUSTC_WRAPPER above. | ||
| - name: Start sccache | ||
| uses: mozilla-actions/sccache-action@v0.0.9 | ||
|
|
||
| # Runs every default workflow in a single step | ||
| - name: Run Rust workflows | ||
| uses: aderinom/rust-all-action@v1 | ||
| with: | ||
| run: fmt,clippy,test,doc,shear,deny | ||
| flow-fmt-toolchain: nightly | ||
This file contains hidden or 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,2 +1,5 @@ | ||
| target | ||
| Cargo.lock | ||
| Cargo.lock | ||
|
|
||
| # Vendored rust-all-action bundle for local CI (scripts/ci-local.sh) | ||
| /.tools/ |
This file contains hidden or 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,21 @@ | ||
| # Requires nightly rustfmt to be installed. | ||
|
|
||
| # Comments Formatting | ||
| comment_width = 100 | ||
| wrap_comments = true | ||
| format_code_in_doc_comments = true | ||
| normalize_comments = true # replace `/*comment*/ with `// comment` where possible | ||
|
|
||
| # Imports Formatting | ||
| imports_granularity = "Crate" # Groups imports by their source crate | ||
| group_imports = "StdExternalCrate" # Orders imports by STD, External, Internal | ||
|
|
||
| # Enum Formatting | ||
| enum_discrim_align_threshold = 4 # Vertical Align enum assignments by up to N characters | ||
|
|
||
| # Block and Closure Formatting | ||
| force_multiline_blocks = true # Force multiline closures to be wrapped in a block | ||
|
|
||
| # Patterns Formatting | ||
| condense_wildcard_suffixes = true # Replace (a, _, _) = (1,2,3) with (a, ..) = (1,2,3) | ||
| use_field_init_shorthand = true # A{ x: x } becomes A { x } |
This file contains hidden or 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,9 @@ | ||
| { | ||
| "cSpell.words": [ | ||
| "oneshot", | ||
| "wrapp" | ||
| ], | ||
| "rust-analyzer.rustfmt.extraArgs": [ | ||
| "+nightly" | ||
| ] | ||
| } | ||
|
Aderinom marked this conversation as resolved.
|
||
This file contains hidden or 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,27 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "clippy-watch", | ||
| "type": "shell", | ||
| "command": "cargo watch -x clippy", | ||
| "isBackground": true, | ||
| "problemMatcher": { | ||
| "base": "$rustc", | ||
| "background": { | ||
| "activeOnStart": true, | ||
| "beginsPattern": "^\\[Running 'cargo clippy'\\]", | ||
| "endsPattern": "^\\[Finished running\\. Exit status: [0-9]+\\]" | ||
| } | ||
| }, | ||
| "presentation": { | ||
| "reveal": "never", | ||
| "panel": "dedicated", | ||
| "clear": true | ||
| }, | ||
| "runOptions": { | ||
| "runOn": "folderOpen" | ||
| } | ||
| } | ||
| ] | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.