Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime metric horrible idea #1533

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

runtime metric idea

b306c15
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

runtime metric horrible idea #1533

runtime metric idea
b306c15
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy failed Jul 1, 2024 in 0s

clippy

3 errors, 11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 3
Warning 11
Note 0
Help 0

Versions

  • rustc 1.81.0-nightly (6868c831a 2024-06-30)
  • cargo 1.81.0-nightly (4ed7bee47 2024-06-25)
  • clippy 0.1.81 (6868c83 2024-06-30)

Annotations

Check failure on line 7 in kube-runtime/src/metrics.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item name ends with its containing module's name

error: item name ends with its containing module's name
 --> kube-runtime/src/metrics.rs:7:12
  |
7 | pub struct SchedulerMetrics {
  |            ^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
  = note: `#[deny(clippy::module_name_repetitions)]` implied by `#[deny(clippy::pedantic)]`

Check failure on line 567 in kube-runtime/src/controller/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing `#[must_use]` attribute on a method returning `Self`

error: missing `#[must_use]` attribute on a method returning `Self`
   --> kube-runtime/src/controller/mod.rs:564:5
    |
564 | /     pub fn metrics(mut self, metrics: Arc<crate::metrics::Metrics>) -> Self {
565 | |         self.metrics = metrics;
566 | |         self
567 | |     }
    | |_____^
    |
    = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
    = note: `#[deny(clippy::return_self_not_must_use)]` implied by `#[deny(clippy::pedantic)]`

Check failure on line 564 in kube-runtime/src/controller/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

error: this method could have a `#[must_use]` attribute
   --> kube-runtime/src/controller/mod.rs:564:5
    |
564 |     pub fn metrics(mut self, metrics: Arc<crate::metrics::Metrics>) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn metrics(mut self, metrics: Arc<crate::metrics::Metrics>) -> Self`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
note: the lint level is defined here
   --> kube-runtime/src/lib.rs:12:9
    |
12  | #![deny(clippy::pedantic)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(clippy::must_use_candidate)]` implied by `#[deny(clippy::pedantic)]`

Check warning on line 22 in kube-runtime/src/metrics.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated function `new` is never used

warning: associated function `new` is never used
  --> kube-runtime/src/metrics.rs:22:8
   |
21 | impl Metrics {
   | ------------ associated function in this implementation
22 |     fn new() -> Self {
   |        ^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 9 in kube-client/src/client/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `stream::Stream`

warning: unused import: `stream::Stream`
 --> kube-client/src/client/body.rs:9:15
  |
9 | use futures::{stream::Stream, TryStreamExt};
  |               ^^^^^^^^^^^^^^

Check warning on line 9 in kube-client/src/client/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `TryStreamExt`

warning: unused import: `TryStreamExt`
 --> kube-client/src/client/body.rs:9:31
  |
9 | use futures::{stream::Stream, TryStreamExt};
  |                               ^^^^^^^^^^^^

Check warning on line 236 in kube-client/src/client/config_ext.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated method `hyper_rustls::HttpsConnectorBuilder::<hyper_rustls::builderstates::WantsProtocols1>::with_server_name`: use Self::with_server_name_resolver with FixedServerNameResolver instead

warning: use of deprecated method `hyper_rustls::HttpsConnectorBuilder::<hyper_rustls::builderstates::WantsProtocols1>::with_server_name`: use Self::with_server_name_resolver with FixedServerNameResolver instead
   --> kube-client/src/client/config_ext.rs:236:31
    |
236 |             builder = builder.with_server_name(tsn.clone());
    |                               ^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

Check warning on line 11 in kube-client/src/client/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `BodyStream`

warning: unused import: `BodyStream`
  --> kube-client/src/client/body.rs:11:59
   |
11 | use http_body_util::{combinators::UnsyncBoxBody, BodyExt, BodyStream};
   |                                                           ^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

Check warning on line 219 in kube-derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
   --> kube-derive/src/lib.rs:219:5
    |
219 | /// example](https://github.com/kube-rs/kube/blob/main/examples/crd_api.rs))
    |     ^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
    = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
    |
219 | ///   example](https://github.com/kube-rs/kube/blob/main/examples/crd_api.rs))
    |     ++

Check warning on line 33 in kube-derive/src/custom_resource.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

if let can be simplified with `.unwrap_or_default()`

warning: if let can be simplified with `.unwrap_or_default()`
  --> kube-derive/src/custom_resource.rs:33:15
   |
33 |     #[darling(default)]
   |               ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
help: replace it with
   |
33 ~     #[darling(default)]
34 ~     crates.unwrap_or_default())]
   |

Check warning on line 20 in kube-derive/src/custom_resource.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

if let can be simplified with `.unwrap_or_default()`

warning: if let can be simplified with `.unwrap_or_default()`
  --> kube-derive/src/custom_resource.rs:20:15
   |
20 |     #[darling(default)]
   |               ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
   = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
help: replace it with
   |
20 ~     #[darling(default)]
21 ~     namespaced.unwrap_or_default())]
   |

Check warning on line 219 in kube-derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
   --> kube-derive/src/lib.rs:219:5
    |
219 | /// example](https://github.com/kube-rs/kube/blob/main/examples/crd_api.rs))
    |     ^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
    = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
    |
219 | ///   example](https://github.com/kube-rs/kube/blob/main/examples/crd_api.rs))
    |     ++

Check warning on line 33 in kube-derive/src/custom_resource.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

if let can be simplified with `.unwrap_or_default()`

warning: if let can be simplified with `.unwrap_or_default()`
  --> kube-derive/src/custom_resource.rs:33:15
   |
33 |     #[darling(default)]
   |               ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
help: replace it with
   |
33 ~     #[darling(default)]
34 ~     crates.unwrap_or_default())]
   |

Check warning on line 20 in kube-derive/src/custom_resource.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

if let can be simplified with `.unwrap_or_default()`

warning: if let can be simplified with `.unwrap_or_default()`
  --> kube-derive/src/custom_resource.rs:20:15
   |
20 |     #[darling(default)]
   |               ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
   = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
help: replace it with
   |
20 ~     #[darling(default)]
21 ~     namespaced.unwrap_or_default())]
   |