Skip to content

Commit

Permalink
Merge pull request #17 from shuhuiluo/lint
Browse files Browse the repository at this point in the history
make clippy happy and add ci for linting
  • Loading branch information
malik672 authored Dec 28, 2023
2 parents 10e21b7 + 2f0c020 commit 2c1c036
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 108 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Rust Linting

on:
push:
branches:
- master
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Rust Lint Check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy

- name: Check lint
run: cargo clippy -- -D warnings

- name: Check formatting
run: cargo fmt -- --check
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Rust Tests

on:
push:
Expand Down
40 changes: 35 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "uniswap-sdk-core-rust"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
authors = ["malik <[email protected]>", "aurelhino <shuhuiluo>"]
authors = ["malik <[email protected]>", "Shuhui Luo <twitter.com/aureliano_law>"]
description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
alloy-primitives = "0.5.3"
alloy-primitives = "0.5.4"
eth_checksum = "0.1.2"
lazy_static = "1.4.0"
num-bigint = "0.4.4"
Expand Down
Loading

0 comments on commit 2c1c036

Please sign in to comment.