Skip to content

Commit 77bc59e

Browse files
committed
check clippy in pipeline
1 parent 861e099 commit 77bc59e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

dagger/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ func (m *ReView) CheckAndTestAll(ctx context.Context, source *dagger.Directory)
3131
}
3232
output = output + "\n\n" + o
3333

34+
o, err = linuxContainer(source).WithExec([]string{"cargo", "clippy", "--", "-D", "warnings"}).Stdout(ctx)
35+
if err != nil {
36+
return o, err
37+
}
38+
output = output + "\n\n" + o
39+
3440
return "ok", nil
3541
}
3642

@@ -51,6 +57,9 @@ func linuxContainer(source *dagger.Directory) *dagger.Container {
5157
return dag.Container().
5258
From("rust:"+RustVersion+"-trixie").
5359
WithExec([]string{"apt", "update"}).
60+
WithExec([]string{
61+
"rustup", "component", "add", "clippy",
62+
}).
5463
WithExec([]string{
5564
"apt", "install", "-y",
5665
"libgstreamer1.0-dev",

0 commit comments

Comments
 (0)