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

Replace actions-rs/clippy-check with giraffate/clippy-action #262

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ jobs:
- name: Build binary and tests
run: cargo build --bins --tests --release

- name: Lint code
uses: actions-rs/clippy-check@v1
- name: Clippy
uses: giraffate/clippy-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --release
filter_mode: nofilter
fail_on_error: true
clippy_flags: --all-features --release

- name: Run tests
run: cargo test --release
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format of this file is based on [Keep a Changelog](https://keepachangelog.co

- Update all dependencies, except `hyper` (#260)
- Allow overriding the token through an argument or envvar (#261)
- Replace Lint code in our CI with Clippy+reviewdog (#262)

## [2.11.0]

Expand Down
2 changes: 1 addition & 1 deletion src/notebooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async fn handle_create_command(args: CreateArgs) -> Result<()> {
None => NewNotebook::builder()
.title(String::new())
.time_range(NewTimeRange::Absolute(TimeRange { from, to }))
.front_matter(args.front_matter.unwrap_or_else(FrontMatter::new))
.front_matter(args.front_matter.unwrap_or_default())
.build(),
};

Expand Down
2 changes: 1 addition & 1 deletion src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ async fn expand_template_file(

let notebook = expand_template(template, template_args).context("expanding template")?;

let notebook = notebook_create(&client, workspace_id, notebook)
let notebook = notebook_create(client, workspace_id, notebook)
.await
.context("Error creating notebook")?;

Expand Down
2 changes: 1 addition & 1 deletion src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub async fn retrieve_sha256_hash(version: &str, arch: &str) -> Result<String> {
response
.lines()
.find_map(|line| match line.split_once(" ") {
Some((sha256_hash, file)) if file == "fp" => Some(sha256_hash.to_owned()),
Some((sha256_hash, "fp")) => Some(sha256_hash.to_owned()),
_ => None,
})
.map_or_else(|| Err(anyhow!("version not found in checksum.sha256")), Ok)
Expand Down