Skip to content

Commit f8d7beb

Browse files
committed
ignore some cognitive_complexity for now
1 parent e35d477 commit f8d7beb

File tree

46 files changed

+63
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+63
-0
lines changed

src/bin/coreutils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ fn name(binary_path: &Path) -> Option<&str> {
4747
binary_path.file_stem()?.to_str()
4848
}
4949

50+
#[allow(clippy::cognitive_complexity)]
5051
fn main() {
5152
uucore::panic::mute_sigpipe_panic();
5253

src/uu/cat/src/cat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ fn write_fast<R: FdReadable>(handle: &mut InputHandle<R>) -> CatResult<()> {
456456

457457
/// Outputs file contents to stdout in a line-by-line fashion,
458458
/// propagating any errors that might occur.
459+
#[allow(clippy::cognitive_complexity)]
459460
fn write_lines<R: FdReadable>(
460461
handle: &mut InputHandle<R>,
461462
options: &OutputOptions,

src/uu/cp/src/cp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ impl Attributes {
727727
}
728728

729729
impl Options {
730+
#[allow(clippy::cognitive_complexity)]
730731
fn from_matches(matches: &ArgMatches) -> CopyResult<Self> {
731732
let not_implemented_opts = vec![
732733
#[cfg(not(any(windows, unix)))]
@@ -1467,6 +1468,7 @@ fn aligned_ancestors<'a>(source: &'a Path, dest: &'a Path) -> Vec<(&'a Path, &'a
14671468
///
14681469
/// The original permissions of `source` will be copied to `dest`
14691470
/// after a successful copy.
1471+
#[allow(clippy::cognitive_complexity)]
14701472
fn copy_file(
14711473
progress_bar: &Option<ProgressBar>,
14721474
source: &Path,

src/uu/csplit/src/csplit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ impl<'a> SplitWriter<'a> {
356356
/// - if no line matched, an [`CsplitError::MatchNotFound`].
357357
/// - if there are not enough lines to accommodate the offset, an
358358
/// [`CsplitError::LineOutOfRange`].
359+
#[allow(clippy::cognitive_complexity)]
359360
fn do_to_match<I>(
360361
&mut self,
361362
pattern_as_str: &str,

src/uu/date/src/date.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ impl<'a> From<&'a str> for Rfc3339Format {
141141
}
142142

143143
#[uucore::main]
144+
#[allow(clippy::cognitive_complexity)]
144145
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
145146
let matches = uu_app().try_get_matches_from(args)?;
146147

src/uu/dd/src/dd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ fn finalize<T>(
752752
}
753753

754754
#[cfg(any(target_os = "linux", target_os = "android"))]
755+
#[allow(clippy::cognitive_complexity)]
755756
fn make_linux_oflags(oflags: &OFlags) -> Option<libc::c_int> {
756757
let mut flag = 0;
757758

src/uu/dd/src/parseargs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ impl Parser {
293293
}
294294
}
295295

296+
#[allow(clippy::cognitive_complexity)]
296297
fn parse_input_flags(&mut self, val: &str) -> Result<(), ParseError> {
297298
let mut i = &mut self.iflag;
298299
for f in val.split(',') {
@@ -324,6 +325,7 @@ impl Parser {
324325
Ok(())
325326
}
326327

328+
#[allow(clippy::cognitive_complexity)]
327329
fn parse_output_flags(&mut self, val: &str) -> Result<(), ParseError> {
328330
let mut o = &mut self.oflag;
329331
for f in val.split(',') {

src/uu/dircolors/src/dircolors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ enum ParseState {
284284
use std::collections::HashMap;
285285
use uucore::{format_usage, parse_glob};
286286

287+
#[allow(clippy::cognitive_complexity)]
287288
fn parse<T>(lines: T, fmt: &OutputFmt, fp: &str) -> Result<String, String>
288289
where
289290
T: IntoIterator,

src/uu/du/src/du.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ fn choose_size(matches: &ArgMatches, stat: &Stat) -> u64 {
289289

290290
// this takes `my_stat` to avoid having to stat files multiple times.
291291
// XXX: this should use the impl Trait return type when it is stabilized
292+
#[allow(clippy::cognitive_complexity)]
292293
fn du(
293294
mut my_stat: Stat,
294295
options: &Options,
@@ -521,6 +522,7 @@ fn build_exclude_patterns(matches: &ArgMatches) -> UResult<Vec<Pattern>> {
521522
}
522523

523524
#[uucore::main]
525+
#[allow(clippy::cognitive_complexity)]
524526
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
525527
let args = args.collect_ignore();
526528

src/uu/env/src/env.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ pub fn uu_app() -> Command {
175175
.arg(Arg::new("vars").action(ArgAction::Append))
176176
}
177177

178+
#[allow(clippy::cognitive_complexity)]
178179
fn run_env(args: impl uucore::Args) -> UResult<()> {
179180
let app = uu_app();
180181
let matches = app.try_get_matches_from(args).with_exit_code(125)?;

0 commit comments

Comments
 (0)