Skip to content

Commit 7d29ecf

Browse files
committed
ci: run clippy on all crates
1 parent 906be1c commit 7d29ecf

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

.github/features.ua

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
# Test combinations of features
22

3-
Command ← {"cargo" "clippy" "--lib" "--no-default-features"}
4-
Features ← (
5-
{"audio" "tls"}
6-
⊂⨬(
7-
{"gif,image,terminal_image,webcam" "lsp,raw_mode"}
8-
| {"audio_encode" "gif" "image" "terminal_image" "lsp" "native_sys" "raw_mode"}
9-
) ∈:□"all" &args
3+
Command ← {"cargo" "clippy" "--no-default-features"}
4+
ClippyArgs ← {"--deny=warnings"}
5+
AllowNotAll ← {"--allow=unused"}
6+
# Success ? Package Features UseAll
7+
Run ← (
8+
⊸(&p $"Checking package _")
9+
⊂Command {"--package" ∘}
10+
⊙(
11+
˜⧅⋅⋅1⇡2⊸⧻
12+
≡⌟{"--features" /$"_,_"▽}
13+
⍚(⊂□⨬$"features: _"⋅"no features"=₀⊸⧻°□⊸⊣)
14+
⍚˜⊂{⊂₃{"--"} ClippyArgs AllowNotAll}
15+
⊂⊙(˜▽{⊂{"all features" "--all-features" "--"} ClippyArgs})
16+
)
17+
≡⌞(
18+
⊙◇°⊂
19+
⊙(&p $"Checking with _")
20+
&runi ⊂
21+
)
22+
/×=₀
1023
)
11-
12-
&p "Checking with no features"
13-
⍤⟜≍: 0 &runi Command
14-
15-
↘1⋯⇡ⁿ:2⧻. Features
16-
≡(/$"_,_" ▽
17-
&p $"Checking with features: _".
18-
⊂ Command ⊂ □"--features" □
19-
⍤⟜≍: 0 &runi
20-
)⊙¤
24+
/◇⊂{
25+
¤Run "uiua" (
26+
{"audio" "tls" "binary"}
27+
⊂⨬(
28+
{"gif,image,terminal_image,webcam" "lsp,raw_mode"}
29+
| {"audio_encode" "gif" "image" "terminal_image" "lsp" "native_sys" "raw_mode"}
30+
) ˜∊□"all" &args
31+
) 1
32+
≡⌟₂◇Run {"site" "uiua-editor" "tests_ffi" "uiua_parser"} {} 0
33+
}
34+
⍤"One or more invocations failed" /×

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ system = ["libffi?/system"]
165165

166166
[[bin]]
167167
name = "uiua"
168+
required-features = ["binary"]
168169

169170
[workspace]
170171
members = ["site", "tests_ffi", "pad/editor", "parser"]

src/sys/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ pub(crate) fn run_sys_op(op: &SysOp, env: &mut Uiua) -> UiuaResult {
11791179
.change_directory(&path)
11801180
.map_err(|e| env.error(e))?;
11811181
}
1182+
#[cfg_attr(not(feature = "image"), expect(clippy::let_unit_value))]
11821183
SysOp::WebcamCapture => {
11831184
let index = env.pop(1)?.as_nat(env, "Webcam index must be an integer")?;
11841185
let _image = (env.rt.backend)

0 commit comments

Comments
 (0)