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

TS Function stuff #277

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

this is the wip

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

TS Function stuff #277

this is the wip
41b09e6
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy failed Jul 31, 2024 in 4s

clippy

1 error, 255 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 255
Note 0
Help 0

Versions

  • rustc 1.80.0 (051478957 2024-07-21)
  • cargo 1.80.0 (376290515 2024-07-16)
  • clippy 0.1.80 (0514789 2024-07-21)

Annotations

Check warning on line 41 in specta-util/src/type_collection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-util/src/type_collection.rs:41:29
   |
41 |             let dt = export(&mut type_map);
   |                             ^^^^^^^^^^^^^ help: change this to: `type_map`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 17 in specta-util/src/type_collection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> specta-util/src/type_collection.rs:11:1
   |
11 | / impl Default for TypeCollection {
12 | |     fn default() -> Self {
13 | |         Self {
14 | |             types: HashMap::new(),
15 | |         }
16 | |     }
17 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `-W clippy::derivable-impls` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]`
   = help: remove the manual implementation...
help: ...and instead derive it
   |
7  + #[derive(Default)]
8  | pub struct TypeCollection {
   |

Check warning on line 15 in specta-typescript/src/function.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `lang`

warning: unused variable: `lang`
  --> specta-typescript/src/function.rs:15:26
   |
15 |     pub fn render(&self, lang: Typescript) -> Result<String> {
   |                          ^^^^ help: if this is intentional, prefix it with an underscore: `_lang`
   |
   = note: `#[warn(unused_variables)]` on by default

Check warning on line 11 in specta-util/src/export.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> specta-util/src/export.rs:11:15
   |
11 | static TYPES: OnceLock<Mutex<HashMap<SpectaID, fn(&mut TypeMap) -> NamedDataType>>> =
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `-W clippy::type-complexity` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`

Check warning on line 72 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
  --> specta-rust/src/lib.rs:72:30
   |
72 |         DataType::Enum(_) => todo!(),
   |                              ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo

Check warning on line 70 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
  --> specta-rust/src/lib.rs:70:13
   |
70 |             todo!();
   |             ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo

Check warning on line 37 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
  --> specta-rust/src/lib.rs:37:26
   |
37 |                     .map(|v| datatype(v))
   |                          ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `datatype`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
   = note: `-W clippy::redundant-closure` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`

Check warning on line 28 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-rust/src/lib.rs:28:22
   |
28 |             datatype(&t.value_ty())?
   |                      ^^^^^^^^^^^^^ help: change this to: `t.value_ty()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 27 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-rust/src/lib.rs:27:22
   |
27 |             datatype(&t.key_ty())?,
   |                      ^^^^^^^^^^^ help: change this to: `t.key_ty()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 23 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
  --> specta-rust/src/lib.rs:23:33
   |
23 |         DataType::Literal(_) => todo!(),
   |                                 ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo

Check warning on line 20 in specta-rust/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
  --> specta-rust/src/lib.rs:20:30
   |
20 |         DataType::Unknown => todo!(),
   |                              ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo
   = note: requested on the command line with `-W clippy::todo`

Check warning on line 101 in specta-kotlin/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
   --> specta-kotlin/src/lib.rs:101:14
    |
101 |         _ => todo!(),
    |              ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo

Check warning on line 98 in specta-kotlin/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`todo` should not be present in production code

warning: `todo` should not be present in production code
  --> specta-kotlin/src/lib.rs:98:13
   |
98 |             todo!();
   |             ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#todo
   = note: requested on the command line with `-W clippy::todo`

Check warning on line 61 in specta-kotlin/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-kotlin/src/lib.rs:61:58
   |
61 |         DataType::Nullable(t) => format!("{}?", datatype(&t)?),
   |                                                          ^^ help: change this to: `t`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 41 in specta-kotlin/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-kotlin/src/lib.rs:41:22
   |
41 |             datatype(&t.value_ty())?
   |                      ^^^^^^^^^^^^^ help: change this to: `t.value_ty()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 40 in specta-kotlin/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> specta-kotlin/src/lib.rs:40:22
   |
40 |             datatype(&t.key_ty())?,
   |                      ^^^^^^^^^^^ help: change this to: `t.key_ty()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 4 in specta-typescript/src/js_doc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

private item shadows public glob re-export

warning: private item shadows public glob re-export
 --> specta-typescript/src/js_doc.rs:4:5
  |
4 | use typescript::CommentFormatterArgs;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: the name `CommentFormatterArgs` in the type namespace is supposed to be publicly re-exported here
 --> specta-typescript/src/js_doc.rs:6:9
  |
6 | pub use super::*;
  |         ^^^^^^^^
note: but the private item here shadows it
 --> specta-typescript/src/js_doc.rs:4:5
  |
4 | use typescript::CommentFormatterArgs;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: `#[warn(hidden_glob_reexports)]` on by default

Check warning on line 4 in specta-typescript/src/function.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `CommentFormatterArgs`

warning: unused import: `CommentFormatterArgs`
 --> specta-typescript/src/function.rs:4:23
  |
4 | use crate::{datatype, CommentFormatterArgs, ExportConfig, Typescript};
  |                       ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check failure on line 4 in specta-typescript/src/function.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved import `crate::ExportConfig`

error[E0432]: unresolved import `crate::ExportConfig`
 --> specta-typescript/src/function.rs:4:45
  |
4 | use crate::{datatype, CommentFormatterArgs, ExportConfig, Typescript};
  |                                             ^^^^^^^^^^^^
  |                                             |
  |                                             no `ExportConfig` in the root
  |                                             help: a similar name exists in the module: `ExportContext`

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-zod` is missing `package.readme` metadata

warning: package `specta-zod` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-util` is missing `package.readme` metadata

warning: package `specta-util` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-typescript` is missing `package.readme` metadata

warning: package `specta-typescript` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-swift` is missing `package.readme` metadata

warning: package `specta-swift` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-serde` is missing `package.readme` metadata

warning: package `specta-serde` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

Check warning on line 1 in specta-util/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

package `specta-rust` is missing `package.readme` metadata

warning: package `specta-rust` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata