Skip to content

lint workflow failing on PR without code changes #18

Open
@technicalpickles

Description

@technicalpickles

ie on #17, this is failing

error: useless use of `vec!`
  --> src/ownership/file_generator.rs:26:9
   |
26 | /         vec![
27 | |             "# STOP! - DO NOT EDIT THIS FILE MANUALLY",
28 | |             "# This file was automatically generated by \"bin/codeownership validate\".",
29 | |             "#",
...  |
35 | |             "",
36 | |         ]
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
   = note: `-D clippy::useless-vec` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::useless_vec)]`
help: you can use an array directly
   |
26 ~         ["# STOP! - DO NOT EDIT THIS FILE MANUALLY",
27 +             "# This file was automatically generated by \"bin/codeownership validate\".",
28 +             "#",
29 +             "# CODEOWNERS is used for GitHub to suggest code/file owners to various GitHub",
30 +             "# teams. This is useful when developers create Pull Requests since the",
31 +             "# code/file owner is notified. Reference GitHub docs for more details:",
32 +             "# https://help.github.com/en/articles/about-code-owners",
33 +             "",
34 +             ""]
   |

error: use of `or_insert` to construct default value
   --> src/ownership/validator.rs:158:45
    |
158 |                         let sources = entry.or_insert(Vec::new());
    |                                             ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
    = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`

error: use of `unwrap_or` to construct default value
   --> src/project.rs:227:79
    |
227 |                     owned_gems: deserializer.ruby.map(|ruby| ruby.owned_gems).unwrap_or(Vec::new()),
    |                                                                               ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

error: could not compile `codeowners` (bin "codeowners") due to 3 previous errors
Error: Process completed with exit code 101.

Maybe some of the workflows need to be pinned to specific versions? 🤔

Metadata

Metadata

Assignees

No one assigned

    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