diff --git a/selene-lib/src/ast_util/mod.rs b/selene-lib/src/ast_util/mod.rs index 7947d18e..ff7ecf4e 100644 --- a/selene-lib/src/ast_util/mod.rs +++ b/selene-lib/src/ast_util/mod.rs @@ -16,7 +16,6 @@ mod strip_parentheses; pub mod visit_nodes; pub use extract_static_token::extract_static_token; -pub use loop_tracker::LoopTracker; pub use purge_trivia::purge_trivia; pub use side_effects::HasSideEffects; pub use strip_parentheses::strip_parentheses; diff --git a/selene-lib/src/lints/high_cyclomatic_complexity.rs b/selene-lib/src/lints/high_cyclomatic_complexity.rs index d3dd36d7..cb5104d0 100644 --- a/selene-lib/src/lints/high_cyclomatic_complexity.rs +++ b/selene-lib/src/lints/high_cyclomatic_complexity.rs @@ -131,10 +131,9 @@ fn count_suffix_complexity(suffix: &ast::Suffix, starting_complexity: u16) -> u1 ast::Suffix::Index(ast::Index::Brackets { expression, .. }) => { complexity = count_expression_complexity(expression, complexity) } - #[cfg_attr( - feature = "force_exhaustive_checks", - deny(non_exhaustive_omitted_patterns) - )] + ast::Suffix::Index(ast::Index::Dot { .. }) => { + // Dot indexing doesn't contribute to complexity + } ast::Suffix::Call(call) => match call { ast::Call::AnonymousCall(arguments) => { complexity = count_arguments_complexity(arguments, complexity)