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

Could not build crate using diesel with #![deny(missing_docs)] #845

Closed
weiznich opened this Issue Apr 6, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@weiznich
Contributor

weiznich commented Apr 6, 2017

I would like to build my own crate using diesel with #![deny(missing_docs)] to force everyone to write at least documentation for all public items. Even if every public item is documented this will fail because of the diesel generated code.

It seems like there is no way to document the column structs generated by the table macro.

Minimal Example:

#![deny(missing_docs)]

#[macro_use]
extern crate diesel;


table!{
    some_table {
        id -> BigInt,
        column_a -> Text,
        column_b -> BigInt,
    }
}

Error messages:

error: missing documentation for crate
 --> src/lib.rs:1:1
  |
1 |   #![deny(missing_docs)]
  |  _^ starting here...
2 | |
3 | | #[macro_use]
4 | | extern crate diesel;
5 | |
6 | |
7 | | table!{
  | |______^ ...ending here
  |
note: lint level defined here
 --> src/lib.rs:1:9
  |
1 | #![deny(missing_docs)]
  |         ^^^^^^^^^^^^

error: missing documentation for a module
  --> src/lib.rs:7:1
   |
7  |   table!{
   |  _^ starting here...
8  | |     some_table {
9  | |         id -> BigInt,
10 | |         column_a -> Text,
11 | |         column_b -> BigInt,
12 | |     }
13 | | }
   | |_^ ...ending here
   |
   = note: this error originates in a macro outside of the current crate

error: missing documentation for a struct
  --> src/lib.rs:7:1
   |
7  |   table!{
   |  _^ starting here...
8  | |     some_table {
9  | |         id -> BigInt,
10 | |         column_a -> Text,
11 | |         column_b -> BigInt,
12 | |     }
13 | | }
   | |_^ ...ending here
   |
   = note: this error originates in a macro outside of the current crate

error: missing documentation for a struct
  --> src/lib.rs:7:1
   |
7  |   table!{
   |  _^ starting here...
8  | |     some_table {
9  | |         id -> BigInt,
10 | |         column_a -> Text,
11 | |         column_b -> BigInt,
12 | |     }
13 | | }
   | |_^ ...ending here
   |
   = note: this error originates in a macro outside of the current crate

error: missing documentation for a struct
  --> src/lib.rs:7:1
   |
7  |   table!{
   |  _^ starting here...
8  | |     some_table {
9  | |         id -> BigInt,
10 | |         column_a -> Text,
11 | |         column_b -> BigInt,
12 | |     }
13 | | }
   | |_^ ...ending here
   |
   = note: this error originates in a macro outside of the current crate
@killercup

This comment has been minimized.

Member

killercup commented Apr 6, 2017

Dupe of #378, still very much a valid bug.

Does #[allow(missing_docs)] on the mod created by diesel help you.

@killercup killercup closed this Apr 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment