mirror of
https://github.com/nix-community/nix-init.git
synced 2024-07-14 11:10:25 +03:00
update rustfmt.toml
This commit is contained in:
parent
826246e01d
commit
506116dd77
8
build.rs
8
build.rs
@ -1,13 +1,13 @@
|
||||
use clap::{CommandFactory, ValueEnum};
|
||||
use clap_complete::{generate_to, Shell};
|
||||
use clap_mangen::Man;
|
||||
|
||||
use std::{
|
||||
env,
|
||||
fs::{create_dir_all, File},
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use clap::{CommandFactory, ValueEnum};
|
||||
use clap_complete::{generate_to, Shell};
|
||||
use clap_mangen::Man;
|
||||
|
||||
include!("src/cli.rs");
|
||||
|
||||
fn main() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use askalono::Store;
|
||||
|
||||
use std::{env::args_os, fs::File};
|
||||
|
||||
use askalono::Store;
|
||||
|
||||
fn main() {
|
||||
let mut args = args_os();
|
||||
args.next().unwrap();
|
||||
|
@ -2,11 +2,11 @@ unstable_features = true
|
||||
|
||||
condense_wildcard_suffixes = true
|
||||
format_code_in_doc_comments = true
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Crate"
|
||||
newline_style = "Unix"
|
||||
normalize_comments = true
|
||||
normalize_doc_attributes = true
|
||||
overflow_delimited_expr = false
|
||||
reorder_impl_items = true
|
||||
spaces_around_ranges = true
|
||||
use_field_init_shorthand = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
use parse_display::Display;
|
||||
|
||||
use std::fmt::{self, Display, Formatter};
|
||||
|
||||
use parse_display::Display;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum BuildType {
|
||||
BuildGoModule,
|
||||
|
@ -1,3 +1,5 @@
|
||||
use std::{fs, path::PathBuf};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION};
|
||||
use rustc_hash::FxHashMap;
|
||||
@ -6,8 +8,6 @@ use serde::Deserialize;
|
||||
use tokio::process::Command;
|
||||
use xdg::BaseDirectories;
|
||||
|
||||
use std::{fs, path::PathBuf};
|
||||
|
||||
use crate::utils::{CommandExt, ResultExt};
|
||||
|
||||
#[derive(Default, Deserialize)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
use clap::Parser;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
/// Generate Nix packages with hash prefetching, license detection, and more
|
||||
/// https://github.com/nix-community/nix-init
|
||||
#[derive(Parser)]
|
||||
|
@ -1,11 +1,11 @@
|
||||
use anyhow::Result;
|
||||
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
fmt::Write,
|
||||
};
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct AllInputs {
|
||||
pub native_build_inputs: Inputs,
|
||||
|
@ -1,10 +1,10 @@
|
||||
use std::{borrow::Cow, fmt::Write, fs::File, path::Path};
|
||||
|
||||
use anyhow::Result;
|
||||
use heck::ToLowerCamelCase;
|
||||
use regex::{Captures, Regex};
|
||||
use serde::Deserialize;
|
||||
|
||||
use std::{borrow::Cow, fmt::Write, fs::File, path::Path};
|
||||
|
||||
use crate::utils::ResultExt;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -1,13 +1,13 @@
|
||||
mod deps;
|
||||
mod goreleaser;
|
||||
|
||||
pub use goreleaser::write_ldflags;
|
||||
|
||||
use std::{
|
||||
fs::File,
|
||||
io::{BufRead, BufReader},
|
||||
};
|
||||
|
||||
pub use goreleaser::write_ldflags;
|
||||
|
||||
use crate::{inputs::AllInputs, lang::go::deps::load_go_dependency};
|
||||
|
||||
pub fn load_go_dependencies(inputs: &mut AllInputs, go_sum: &File) {
|
||||
|
@ -1,9 +1,3 @@
|
||||
use chumsky::{error::EmptyErr, extra::Err, primitive::end, Parser};
|
||||
use heck::{AsKebabCase, ToKebabCase};
|
||||
use pep_508::{Comparator, Dependency, Marker, Operator, Variable};
|
||||
use serde::Deserialize;
|
||||
use serde_with::{serde_as, DefaultOnError};
|
||||
|
||||
use std::{
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
fs::{self, File},
|
||||
@ -12,6 +6,12 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use chumsky::{error::EmptyErr, extra::Err, primitive::end, Parser};
|
||||
use heck::{AsKebabCase, ToKebabCase};
|
||||
use pep_508::{Comparator, Dependency, Marker, Operator, Variable};
|
||||
use serde::Deserialize;
|
||||
use serde_with::{serde_as, DefaultOnError};
|
||||
|
||||
use crate::{inputs::AllInputs, license::parse_spdx_expression, utils::ResultExt};
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -2,6 +2,15 @@ mod deps;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
fmt::{Display, Write},
|
||||
fs::File,
|
||||
io::{self, Write as _},
|
||||
path::Path,
|
||||
process::Command,
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use cargo::{
|
||||
core::{
|
||||
@ -17,17 +26,8 @@ use indoc::writedoc;
|
||||
use rayon::iter::{IntoParallelIterator, ParallelIterator};
|
||||
use rustc_hash::FxHashMap;
|
||||
use rustyline::{history::History, Editor};
|
||||
use std::process::Command;
|
||||
use tracing::error;
|
||||
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
fmt::{Display, Write},
|
||||
fs::File,
|
||||
io::{self, Write as _},
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
cmd::NURL,
|
||||
inputs::AllInputs,
|
||||
|
@ -1,3 +1,5 @@
|
||||
use std::fs::{copy, create_dir, File};
|
||||
|
||||
use heck::AsKebabCase;
|
||||
use insta::assert_debug_snapshot;
|
||||
use tempfile::tempdir;
|
||||
@ -5,8 +7,6 @@ use tempfile::tempdir;
|
||||
use super::resolve_workspace;
|
||||
use crate::{inputs::AllInputs, lang::rust::load_rust_dependencies};
|
||||
|
||||
use std::fs::{copy, create_dir, File};
|
||||
|
||||
macro_rules! tests {
|
||||
($($name:ident)+) => {
|
||||
$(
|
||||
|
18
src/main.rs
18
src/main.rs
@ -10,6 +10,15 @@ mod macros;
|
||||
mod prompt;
|
||||
mod utils;
|
||||
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
fmt::Write as _,
|
||||
fs::{create_dir_all, metadata, read_dir, read_to_string, File},
|
||||
io::{stderr, BufRead, BufReader, Write as _},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use askalono::{IdentifiedLicense, ScanResult, ScanStrategy, TextData};
|
||||
use bstr::{ByteSlice, ByteVec};
|
||||
@ -30,15 +39,6 @@ use tracing::debug;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use zip::ZipArchive;
|
||||
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
fmt::Write as _,
|
||||
fs::{create_dir_all, metadata, read_dir, read_to_string, File},
|
||||
io::{stderr, BufRead, BufReader, Write as _},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
build::{BuildType, PythonFormat, RustVendor},
|
||||
cfg::load_config,
|
||||
|
@ -1,9 +1,9 @@
|
||||
use std::{fmt::Display, future::Future, io::BufRead, pin::Pin, process::Output};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use tokio::process::Command;
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use std::{fmt::Display, future::Future, io::BufRead, pin::Pin, process::Output};
|
||||
|
||||
use crate::cmd::NIX;
|
||||
|
||||
pub const FAKE_HASH: &str = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
|
Loading…
Reference in New Issue
Block a user