Method action_summary
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def action_summary(results)
base_path = Pathname.new(results[:path])
files = results[:results]
BawWorkers::Config.logger_worker.debug(self.name) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method action_summary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def action_summary(results)
base_path = Pathname.new(results[:path])
files = results[:results]
BawWorkers::Config.logger_worker.debug(self.name) {
Method action_gather_and_process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_gather_and_process(to_do_path, is_real_run, copy_on_success = false)
gather_files = action_gather_files
file_hashes = gather_files.run(to_do_path)
results = {path: to_do_path, results: []}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method action_run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_run(harvest_params, is_real_run)
BawWorkers::Config.logger_worker.info(self.name) {
"Started harvest #{is_real_run ? 'real run' : 'dry run' } using '#{harvest_params}'."
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"