8000 CI: Make clippy warnings trigger warnings instead of failures · Issue #338 · slog-rs/slog · GitHub 8000
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CI: Make clippy warnings trigger warnings instead of failures #338
Closed as not planned
@Techcable

Description

@Techcable

For example, while working on PR #337 I triggered the clippy lint #[warn(clippy::std-instead-of-alloc)]

CI error log
error: used import from `std` instead of `alloc`
    --> src/lib.rs:2423:8
     |
2423 |     T: std::string::ToString + FromStr + PartialEq + fmt::Debug,
     |        ^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider importing the item from `alloc`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc
     = note: `-D clippy::std-instead-of-alloc` implied by `-D warnings`

error: used import from `std` instead of `core`
  --> src/tests.rs:37:14
   |
37 |         ) -> std::result::Result<Self::Ok, Self::Err> {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider importing the item from `core`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
   = note: `-D clippy::std-instead-of-core` implied by `-D warnings`

error: used import from `std` instead of `alloc`
  --> src/tests.rs:69:26
   |
69 |     struct TestError<E = std::string::ParseError>(&'static str, Option<E>);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider importing the item from `alloc`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc

error: used import from `std` instead of `core`
   --> src/tests.rs:115:18
    |
115 |             ) -> std::result::Result<Self::Ok, Self::Err> {
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider importing the item from `core`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core

Ideally this would have triggered a github actions "warnings::" annotation instead of a hard failure.
This would still flag the issue without completely failing the build.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0