X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuild.yml;h=065a3241a8e324cd09db7ace5489d03d20ec88d5;hb=262172cddba7f2af9cfd3f5035564ac04e8af3a5;hp=6ea1e4e1e1957d0c4b2dc8d7efa3ff6f89231b9d;hpb=426c5b227de2c88909c9385f40106f94e745eef4;p=rust-lightning diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ea1e4e1..065a3241 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -184,3 +184,23 @@ jobs: [ "$(diff lightning-c-bindings/include/lightningpp.hpp.sorted lightning-c-bindings/include/lightningpp.hpp.new.sorted)" != "" ] && exit 3 git diff --exit-code fi + + linting: + runs-on: ubuntu-latest + env: + TOOLCHAIN: 1.39.0 + steps: + - name: Checkout source code + uses: actions/checkout@v2 + - name: Install Rust ${{ env.TOOLCHAIN }} toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.TOOLCHAIN }} + override: true + profile: minimal + - name: Install clippy + run: | + rustup component add clippy + - name: Run default clippy linting + run: | + cargo clippy -- -Aclippy::erasing_op -Aclippy::never_loop -Aclippy::if_same_then_else