Add a "ci" feature to make clippy ignore docs warnings

This commit is contained in:
Ana Gelez 2020-01-31 08:25:25 +01:00
parent 55ccd1b4e4
commit c5fa90176c
15 changed files with 22 additions and 7 deletions

View file

@ -19,7 +19,7 @@ executors:
working_directory: ~/projects/Plume working_directory: ~/projects/Plume
environment: environment:
RUST_TEST_THREADS: 1 RUST_TEST_THREADS: 1
FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>> FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>> ci
DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>> DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>>

View file

@ -79,6 +79,7 @@ postgres = ["plume-models/postgres", "diesel/postgres"]
sqlite = ["plume-models/sqlite", "diesel/sqlite"] sqlite = ["plume-models/sqlite", "diesel/sqlite"]
debug-mailer = [] debug-mailer = []
test = [] test = []
ci = ["plume-models/ci", "plume-api/ci", "plume-common/ci"]
[workspace] [workspace]
members = ["plume-api", "plume-cli", "plume-models", "plume-common", "plume-front", "plume-macro"] members = ["plume-api", "plume-cli", "plume-models", "plume-common", "plume-front", "plume-macro"]

View file

@ -7,3 +7,6 @@ edition = "2018"
[dependencies] [dependencies]
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
[features]
ci = []

View file

@ -1,4 +1,4 @@
#![warn(missing_docs)] #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate serde_derive; extern crate serde_derive;

View file

@ -23,3 +23,4 @@ path = "../plume-models"
[features] [features]
postgres = ["plume-models/postgres", "diesel/postgres"] postgres = ["plume-models/postgres", "diesel/postgres"]
sqlite = ["plume-models/sqlite", "diesel/sqlite"] sqlite = ["plume-models/sqlite", "diesel/sqlite"]
ci = ["plume-models/ci"]

View file

@ -1,7 +1,8 @@
use dotenv; #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
use clap::App; use clap::App;
use diesel::Connection; use diesel::Connection;
use dotenv;
use plume_models::{instance::Instance, Connection as Conn, CONFIG}; use plume_models::{instance::Instance, Connection as Conn, CONFIG};
use std::io::{self, prelude::*}; use std::io::{self, prelude::*};

View file

@ -30,3 +30,6 @@ version = "0.4"
[dependencies.pulldown-cmark] [dependencies.pulldown-cmark]
default-features = false default-features = false
version = "0.2.0" version = "0.2.0"
[features]
ci = []

View file

@ -1,4 +1,4 @@
#![warn(missing_docs)] #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#[macro_use] #[macro_use]

View file

@ -13,3 +13,6 @@ gettext-utils = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a
lazy_static = "1.3" lazy_static = "1.3"
serde = "1.0" serde = "1.0"
serde_json = "1.0" serde_json = "1.0"
[features]
ci = []

View file

@ -1,6 +1,6 @@
#![recursion_limit = "128"] #![recursion_limit = "128"]
#![feature(decl_macro, proc_macro_hygiene, try_trait)] #![feature(decl_macro, proc_macro_hygiene, try_trait)]
#![warn(missing_docs)] #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate gettext_macros; extern crate gettext_macros;

View file

@ -19,3 +19,4 @@ syn = "0.15.27"
default = [] default = []
postgres = [] postgres = []
sqlite = [] sqlite = []
ci = []

View file

@ -1,5 +1,5 @@
#![recursion_limit = "128"] #![recursion_limit = "128"]
#![warn(missing_docs)] #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate quote; extern crate quote;

View file

@ -54,3 +54,4 @@ diesel_migrations = "1.3.0"
[features] [features]
postgres = ["diesel/postgres", "plume-macro/postgres" ] postgres = ["diesel/postgres", "plume-macro/postgres" ]
sqlite = ["diesel/sqlite", "plume-macro/sqlite" ] sqlite = ["diesel/sqlite", "plume-macro/sqlite" ]
ci = ["plume-macro/ci"]

View file

@ -1,7 +1,7 @@
#![feature(try_trait)] #![feature(try_trait)]
#![feature(never_type)] #![feature(never_type)]
#![feature(proc_macro_hygiene)] #![feature(proc_macro_hygiene)]
#![warn(missing_docs)] #![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate diesel; extern crate diesel;

View file

@ -1,4 +1,5 @@
#![allow(clippy::too_many_arguments)] #![allow(clippy::too_many_arguments)]
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#![feature(decl_macro, proc_macro_hygiene, try_trait)] #![feature(decl_macro, proc_macro_hygiene, try_trait)]
#[macro_use] #[macro_use]