Skip to content

Commit 27b4a38

Browse files
authored
Merge pull request aya-rs#23 from vadorovsky/lint
github: Add lint check
2 parents c74b3ad + db2a8e8 commit 27b4a38

File tree

7 files changed

+166
-105
lines changed

7 files changed

+166
-105
lines changed

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- ci
8+
9+
pull_request:
10+
branches:
11+
- main
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
lint:
18+
runs-on: ubuntu-20.04
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: actions-rs/toolchain@v1
24+
with:
25+
profile: minimal
26+
toolchain: nightly
27+
components: rustfmt, clippy, miri, rust-src
28+
override: true
29+
30+
- name: Check formatting
31+
run: |
32+
cargo fmt --all -- --check
33+
- name: Run clippy
34+
run: |
35+
cargo clippy --workspace -- --deny warnings

Cargo.lock

Lines changed: 81 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ edition = "2021"
1212

1313
[dependencies]
1414
# cli deps
15-
structopt = { version = "0.3", optional = true }
16-
clap = { version = "2", optional = true }
15+
clap = { version = "3.2", optional = true, features = ["derive"] }
1716
simplelog = {version = "0.7.6", optional = true}
1817

1918
# lib deps
@@ -38,7 +37,7 @@ llvm-proxy = [
3837
"llvm-sys/disable-alltargets-init"
3938
]
4039
lib = ["thiserror", "ar", "log"]
41-
cli = ["structopt", "clap", "simplelog"]
40+
cli = ["clap", "simplelog"]
4241
system-llvm = ["cli", "lib", "llvm-sys"]
4342
rust-llvm = ["cli", "lib", "llvm-proxy"]
4443
default = ["rust-llvm"]

rustfmt.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignore = [
2+
"third-party",
3+
]

0 commit comments

Comments
 (0)