Skip to content

Commit 262172c

Browse files
committed
add linting to Github CI
1 parent 426c5b2 commit 262172c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,23 @@ jobs:
184184
[ "$(diff lightning-c-bindings/include/lightningpp.hpp.sorted lightning-c-bindings/include/lightningpp.hpp.new.sorted)" != "" ] && exit 3
185185
git diff --exit-code
186186
fi
187+
188+
linting:
189+
runs-on: ubuntu-latest
190+
env:
191+
TOOLCHAIN: 1.39.0
192+
steps:
193+
- name: Checkout source code
194+
uses: actions/checkout@v2
195+
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
196+
uses: actions-rs/toolchain@v1
197+
with:
198+
toolchain: ${{ env.TOOLCHAIN }}
199+
override: true
200+
profile: minimal
201+
- name: Install clippy
202+
run: |
203+
rustup component add clippy
204+
- name: Run default clippy linting
205+
run: |
206+
cargo clippy -- -Aclippy::erasing_op -Aclippy::never_loop -Aclippy::if_same_then_else

0 commit comments

Comments
 (0)