|
|
@ -1,4 +1,6 @@ |
|
|
|
/*! TODO: Application description here
|
|
|
|
/*! Gitig is a small cli program to handle gitignore files
|
|
|
|
|
|
|
|
It helps adding new entries to ignore and start a new project with templates from [Github](https://github.com/github/gitignore).
|
|
|
|
|
|
|
|
This project used [rust-cli-boilerplate](https://github.com/ssokolow/rust-cli-boilerplate)
|
|
|
|
*/
|
|
|
@ -20,12 +22,15 @@ This project used [rust-cli-boilerplate](https://github.com/ssokolow/rust-cli-bo |
|
|
|
clippy::restriction
|
|
|
|
)]
|
|
|
|
// Opt out of the lints I've seen and don't want
|
|
|
|
#![allow(clippy::float_arithmetic, clippy::implicit_return, clippy::filter_map)]
|
|
|
|
#![allow(
|
|
|
|
clippy::float_arithmetic,
|
|
|
|
clippy::implicit_return,
|
|
|
|
clippy::filter_map,
|
|
|
|
clippy::wildcard_imports
|
|
|
|
)]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate error_chain;
|
|
|
|
extern crate reqwest;
|
|
|
|
extern crate serde;
|
|
|
|
|
|
|
|
// stdlib imports
|
|
|
|
use std::convert::TryInto;
|
|
|
@ -33,7 +38,6 @@ use std::io; |
|
|
|
|
|
|
|
// 3rd-party imports
|
|
|
|
mod errors;
|
|
|
|
use log::error;
|
|
|
|
use structopt::{clap, StructOpt};
|
|
|
|
|
|
|
|
// Local imports
|
|
|
@ -52,6 +56,7 @@ mod template; |
|
|
|
///
|
|
|
|
/// **TODO:** Consider switching to Failure and look into `impl Termination` as a way to avoid
|
|
|
|
/// having to put the error message pretty-printing inside main()
|
|
|
|
#[allow(clippy::result_expect_used, clippy::exit, clippy::use_debug)]
|
|
|
|
fn main() {
|
|
|
|
// Parse command-line arguments (exiting on parse error, --version, or --help)
|
|
|
|
let opts = app::CliOpts::from_args();
|
|
|
|