Skip to content

Commit

Permalink
Merge pull request aya-rs#23 from vadorovsky/lint
Browse files Browse the repository at this point in the history
github: Add lint check
  • Loading branch information
vadorovsky authored Nov 7, 2022
2 parents c74b3ad + db2a8e8 commit 27b4a38
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 105 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: lint

on:
push:
branches:
- main
- ci

pull_request:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
lint:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy, miri, rust-src
override: true

- name: Check formatting
run: |
cargo fmt --all -- --check
- name: Run clippy
run: |
cargo clippy --workspace -- --deny warnings
144 changes: 81 additions & 63 deletions Cargo.lock

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

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ edition = "2021"

[dependencies]
# cli deps
structopt = { version = "0.3", optional = true }
clap = { version = "2", optional = true }
clap = { version = "3.2", optional = true, features = ["derive"] }
simplelog = {version = "0.7.6", optional = true}

# lib deps
Expand All @@ -38,7 +37,7 @@ llvm-proxy = [
"llvm-sys/disable-alltargets-init"
]
lib = ["thiserror", "ar", "log"]
cli = ["structopt", "clap", "simplelog"]
cli = ["clap", "simplelog"]
system-llvm = ["cli", "lib", "llvm-sys"]
rust-llvm = ["cli", "lib", "llvm-proxy"]
default = ["rust-llvm"]
3 changes: 3 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore = [
"third-party",
]
Loading

0 comments on commit 27b4a38

Please sign in to comment.