Skip to content

Commit

Permalink
Fail CI on failed fmt or other linting file changes (#1422)
Browse files Browse the repository at this point in the history
* Fail CI on failed fmt or other linting file changes

* Revert "Fail CI on failed fmt or other linting file changes"

This reverts commit 50d1ea9.

* Fail lint on failed formatting

* format the existing unformatted code
  • Loading branch information
LesnyRumcajs authored Feb 10, 2022
1 parent 7ff0be8 commit f7141b4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ clean:
@echo "Done cleaning."

lint: license clean
cargo fmt --all
cargo fmt --all --check
cargo clippy -- -D warnings

build:
Expand Down
4 changes: 2 additions & 2 deletions node/db/src/rocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use super::errors::Error;
use super::Store;
use num_cpus;
pub use rocksdb::{Options, WriteBatch, DB};
use std::path::Path;
use num_cpus;

/// RocksDB instance this satisfies the [Store] interface.
#[derive(Debug)]
Expand All @@ -29,7 +29,7 @@ impl RocksDb {
let mut db_opts = Options::default();
db_opts.create_if_missing(true);
db_opts.increase_parallelism(num_cpus::get() as i32);
db_opts.set_write_buffer_size(256*1024*1024); // increase from 64MB to 256MB
db_opts.set_write_buffer_size(256 * 1024 * 1024); // increase from 64MB to 256MB
Ok(Self {
db: DB::open(&db_opts, path)?,
})
Expand Down
2 changes: 1 addition & 1 deletion tests/conformance_tests/tests/conformance_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn is_valid_file(entry: &DirEntry) -> bool {
// only run v6 vectors
let v6_filepath = Regex::new(r"specs_actors_v6").unwrap();
let is_extra = Regex::new(r"extra-vectors").unwrap();
if !v6_filepath.is_match(file_name) && ! is_extra.is_match(file_name) {
if !v6_filepath.is_match(file_name) && !is_extra.is_match(file_name) {
println!("SKIPPING: {} ", file_name);
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions types/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// SPDX-License-Identifier: Apache-2.0, MIT

use encoding::repr::Serialize_repr;
use std::convert::TryFrom;
use std::fmt::{self, Display, Formatter};
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use std::convert::TryFrom;
use std::fmt::{self, Display, Formatter};

/// Specifies the network version
#[derive(Debug, PartialEq, Clone, Copy, PartialOrd, Serialize_repr, FromPrimitive)]
Expand Down
2 changes: 1 addition & 1 deletion utils/net_utils/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use std::convert::TryFrom;
use std::io::{self, Stdout, Write};
use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Duration;
use thiserror::Error;
use url::Url;
use std::time::Duration;

#[derive(Debug, Error)]
enum DownloadError {
Expand Down

0 comments on commit f7141b4

Please sign in to comment.