Skip to content

Commit 30182db

Browse files
authored
feat: Add clippy check (#146)
* Add clippy.yml * Add reporter * Add filter_mode: nofilter * Fix clippy warnings * Fix codegen for clippy warnings * Fix clippy warnings * Fix and ignore clippy warnings * Test * Fix
1 parent ea40be0 commit 30182db

File tree

108 files changed

+67
-319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+67
-319
lines changed

.github/workflows/api.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Build
1818
run: cargo build -p atrium-api --verbose
1919
- name: Run tests

.github/workflows/clippy.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Clippy
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
clippy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: dtolnay/rust-toolchain@stable
13+
with:
14+
components: clippy
15+
- uses: giraffate/clippy-action@v1
16+
with:
17+
reporter: "github-pr-check"
18+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-plz.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
- name: Install Rust toolchain

.github/workflows/rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Build
1818
run: cargo build --verbose

.github/workflows/xrpc-client.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Build
1818
run: cargo build -p atrium-xrpc-client --verbose
1919
- name: Run tests

.github/workflows/xrpc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Build
1818
run: cargo build -p atrium-xrpc --verbose
1919
- name: Run tests

atrium-api/src/agent/inner.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ where
4343
async fn auth(&self, is_refresh: bool) -> Option<String> {
4444
self.store.get_session().await.map(|session| {
4545
if is_refresh {
46-
session.refresh_jwt.clone()
46+
session.refresh_jwt
4747
} else {
48-
session.access_jwt.clone()
48+
session.access_jwt
4949
}
5050
})
5151
}

atrium-api/src/app/bsky/actor/get_preferences.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/get_profile.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/get_profiles.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/get_suggestions.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/put_preferences.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/search_actors.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/actor/search_actors_typeahead.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/describe_feed_generator.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_actor_feeds.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_feed_generator.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_feed_generators.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_likes.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_posts.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_reposted_by.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_suggested_feeds.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/feed/get_timeline.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_blocks.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_followers.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_follows.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_list.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_list_blocks.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_list_mutes.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_lists.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_mutes.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/get_suggested_follows_by_actor.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/mute_actor.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/mute_actor_list.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/unmute_actor.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/graph/unmute_actor_list.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/labeler/get_services.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/notification/get_unread_count.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

atrium-api/src/app/bsky/notification/list_notifications.rs

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)