diff --git a/.circleci/config.yml b/.circleci/config.yml index 63f566783..4d816b4c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ executors: working_directory: ~/projects/Plume environment: RUST_TEST_THREADS: 1 - FEATURES: <<#parameters.postgres>>postgres<><<^parameters.postgres>>sqlite<> + FEATURES: <<#parameters.postgres>>postgres<><<^parameters.postgres>>sqlite<>,ci DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<><<^parameters.postgres>>plume.sqlite<> diff --git a/Cargo.toml b/Cargo.toml index 279947717..d128fc146 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,6 +79,7 @@ postgres = ["plume-models/postgres", "diesel/postgres"] sqlite = ["plume-models/sqlite", "diesel/sqlite"] debug-mailer = [] test = [] +ci = ["plume-models/ci", "plume-api/ci", "plume-common/ci"] [workspace] members = ["plume-api", "plume-cli", "plume-models", "plume-common", "plume-front", "plume-macro"] diff --git a/plume-api/Cargo.toml b/plume-api/Cargo.toml index ce51cc54d..d1bbfc247 100644 --- a/plume-api/Cargo.toml +++ b/plume-api/Cargo.toml @@ -7,3 +7,6 @@ edition = "2018" [dependencies] serde = "1.0" serde_derive = "1.0" + +[features] +ci = [] diff --git a/plume-api/src/lib.rs b/plume-api/src/lib.rs index c22af6a95..eca931800 100644 --- a/plume-api/src/lib.rs +++ b/plume-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] + #[macro_use] extern crate serde_derive; diff --git a/plume-cli/Cargo.toml b/plume-cli/Cargo.toml index 4c6bc76fc..c03f4d93c 100644 --- a/plume-cli/Cargo.toml +++ b/plume-cli/Cargo.toml @@ -23,3 +23,4 @@ path = "../plume-models" [features] postgres = ["plume-models/postgres", "diesel/postgres"] sqlite = ["plume-models/sqlite", "diesel/sqlite"] +ci = ["plume-models/ci"] diff --git a/plume-cli/src/main.rs b/plume-cli/src/main.rs index 8dc116920..7b883eec2 100644 --- a/plume-cli/src/main.rs +++ b/plume-cli/src/main.rs @@ -1,7 +1,8 @@ -use dotenv; +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] use clap::App; use diesel::Connection; +use dotenv; use plume_models::{instance::Instance, Connection as Conn, CONFIG}; use std::io::{self, prelude::*}; diff --git a/plume-common/Cargo.toml b/plume-common/Cargo.toml index 6c7e02ff6..b1456e546 100644 --- a/plume-common/Cargo.toml +++ b/plume-common/Cargo.toml @@ -30,3 +30,6 @@ version = "0.4" [dependencies.pulldown-cmark] default-features = false version = "0.2.0" + +[features] +ci = [] diff --git a/plume-common/src/lib.rs b/plume-common/src/lib.rs index 085f1a42c..7227afd4d 100644 --- a/plume-common/src/lib.rs +++ b/plume-common/src/lib.rs @@ -1,3 +1,4 @@ +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] #![feature(associated_type_defaults)] #[macro_use] diff --git a/plume-front/Cargo.toml b/plume-front/Cargo.toml index 90a89a5b9..a132c3a6b 100644 --- a/plume-front/Cargo.toml +++ b/plume-front/Cargo.toml @@ -13,3 +13,6 @@ gettext-utils = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a lazy_static = "1.3" serde = "1.0" serde_json = "1.0" + +[features] +ci = [] diff --git a/plume-front/src/main.rs b/plume-front/src/main.rs index 84c66a739..bde4edaae 100644 --- a/plume-front/src/main.rs +++ b/plume-front/src/main.rs @@ -1,5 +1,6 @@ #![recursion_limit = "128"] #![feature(decl_macro, proc_macro_hygiene, try_trait)] +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] #[macro_use] extern crate gettext_macros; diff --git a/plume-macro/Cargo.toml b/plume-macro/Cargo.toml index c56573773..7c6c9f512 100644 --- a/plume-macro/Cargo.toml +++ b/plume-macro/Cargo.toml @@ -19,3 +19,4 @@ syn = "0.15.27" default = [] postgres = [] sqlite = [] +ci = [] diff --git a/plume-macro/src/lib.rs b/plume-macro/src/lib.rs index 7b0f5d272..d894ee980 100644 --- a/plume-macro/src/lib.rs +++ b/plume-macro/src/lib.rs @@ -1,4 +1,5 @@ #![recursion_limit = "128"] +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] #[macro_use] extern crate quote; diff --git a/plume-models/Cargo.toml b/plume-models/Cargo.toml index d122187c2..5ac808e08 100644 --- a/plume-models/Cargo.toml +++ b/plume-models/Cargo.toml @@ -54,3 +54,4 @@ diesel_migrations = "1.3.0" [features] postgres = ["diesel/postgres", "plume-macro/postgres" ] sqlite = ["diesel/sqlite", "plume-macro/sqlite" ] +ci = ["plume-macro/ci"] diff --git a/plume-models/src/lib.rs b/plume-models/src/lib.rs index 2a56028e5..6cd35ac01 100644 --- a/plume-models/src/lib.rs +++ b/plume-models/src/lib.rs @@ -1,6 +1,7 @@ #![feature(try_trait)] #![feature(never_type)] #![feature(proc_macro_hygiene)] +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] #[macro_use] extern crate diesel; diff --git a/src/main.rs b/src/main.rs index 5016e982d..fb967f108 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ #![allow(clippy::too_many_arguments)] +#![cfg_attr(not(feature = "ci"), warn(missing_docs))] #![feature(decl_macro, proc_macro_hygiene, try_trait)] #[macro_use]