Skip to content

Commit

Permalink
Replace actions-rs/clippy-check with giraffate/clippy-action (#262)
Browse files Browse the repository at this point in the history
* Replace actions-rs/clippy-check with giraffate/clippy-action

* Resolve clippies

* Update changelog
  • Loading branch information
hatchan authored Dec 12, 2023
1 parent a97f34e commit 90af5a5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
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

0 comments on commit 90af5a5

Please sign in to comment.