Skip to content

Commit

Permalink
added new configs and copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
ksrichard committed Jul 3, 2024
1 parent 9d78814 commit 3f3d50a
Show file tree
Hide file tree
Showing 22 changed files with 511 additions and 467 deletions.
8 changes: 8 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[alias]
ci-fmt = "fmt --all -- --check"
ci-fmt-fix = "fmt --all"
ci-clippy = "lints clippy --all-targets --all-features"
ci-test-compile = "test --no-run --workspace --all-features --no-default-features"
ci-test = "nextest run --all-features --release --workspace --exclude integration_tests --profile ci"
ci-cucumber = "test --all-features --release --package integration_tests"
ci-check = "check --workspace --release --all-features --all-targets --locked"
6 changes: 6 additions & 0 deletions ci_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Copyright 2024 The Tari Project
# SPDX-License-Identifier: BSD-3-Clause
#

cargo +nightly ci-fmt && cargo machete && cargo ci-check && cargo ci-test && cargo ci-cucumber
32 changes: 32 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
edition = "2021"

# Stable features
hard_tabs = false
match_block_trailing_comma = true
max_width = 120
newline_style = "Native"
reorder_imports = true
reorder_modules = true
use_field_init_shorthand = true
use_small_heuristics = "default"
use_try_shorthand = true
wrap_comments = true

ignore = []

# Nightly features
binop_separator = "Back"
comment_width = 120
format_code_in_doc_comments = true
format_strings = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
imports_layout = "HorizontalVertical"
normalize_comments = true
overflow_delimited_expr = true
reorder_impl_items = true
space_after_colon = true
space_before_colon = false
struct_lit_single_line = true
unstable_features = true
where_single_line = true
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// Copyright 2024 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause

use std::path::PathBuf;

use clap::builder::Styles;
use clap::builder::styling::AnsiColor;
use clap::Parser;
use clap::{
builder::{styling::AnsiColor, Styles},
Parser,
};
use env_logger::Builder;
use log::LevelFilter;

Expand Down
9 changes: 5 additions & 4 deletions src/server/config.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::path::PathBuf;
use std::time::Duration;
// Copyright 2024 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause

use crate::server::p2p;
use crate::server::p2p::peer_store::PeerStoreConfig;
use std::{path::PathBuf, time::Duration};

use crate::server::{p2p, p2p::peer_store::PeerStoreConfig};

/// Config is the server configuration struct.
#[derive(Clone)]
Expand Down
Loading

0 comments on commit 3f3d50a

Please sign in to comment.