Move common lint controls to Cargo.toml
This moves lint overrides to Cargo.toml so that they can more easily be shared across crates.
This commit is contained in:
parent
702c676107
commit
5264074c1b
7 changed files with 17 additions and 6 deletions
|
|
@ -6,6 +6,10 @@ all = { level = "allow", priority = -2 }
|
|||
correctness = { level = "warn", priority = -1 }
|
||||
complexity = { level = "warn", priority = -1 }
|
||||
|
||||
[workspace.lints.rust]
|
||||
missing_docs = "warn"
|
||||
rust_2018_idioms = "warn"
|
||||
|
||||
[package]
|
||||
name = "mdbook"
|
||||
version = "0.4.52"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! A basic example of a preprocessor that does nothing.
|
||||
|
||||
use crate::nop_lib::Nop;
|
||||
use clap::{Arg, ArgMatches, Command};
|
||||
use mdbook::book::Book;
|
||||
|
|
@ -7,7 +9,7 @@ use semver::{Version, VersionReq};
|
|||
use std::io;
|
||||
use std::process;
|
||||
|
||||
pub fn make_app() -> Command {
|
||||
fn make_app() -> Command {
|
||||
Command::new("nop-preprocessor")
|
||||
.about("A mdbook preprocessor which does precisely nothing")
|
||||
.subcommand(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! A test to ensure that the remove-emphasis example works.
|
||||
|
||||
#[test]
|
||||
fn remove_emphasis_works() {
|
||||
// Tests that the remove-emphasis example works as expected.
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@
|
|||
//! # run().unwrap()
|
||||
//! ```
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use log::{debug, trace, warn};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::collections::HashMap;
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@
|
|||
//! [relevant chapter]: https://rust-lang.github.io/mdBook/for_developers/backends.html
|
||||
//! [`Config`]: config::Config
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![deny(rust_2018_idioms)]
|
||||
|
||||
pub mod book;
|
||||
pub mod config;
|
||||
pub mod preprocess;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! The mdbook CLI.
|
||||
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
//! The GUI test runner.
|
||||
//!
|
||||
//! This uses the browser-ui-test npm package to use a headless Chrome to
|
||||
//! exercise the behavior of rendered books. See `CONTRIBUTING.md` for more
|
||||
//! information.
|
||||
|
||||
use serde_json::Value;
|
||||
use std::collections::HashSet;
|
||||
use std::env::current_dir;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue