Showing 1,379 of 1,379 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
raw_keys.each do |key|
if reduced["#{key}__VALS"]
reduced["_NUM_SAMPLES"] ||= reduced["#{key}__VALS"].length # Keep a single sample count per packet
reduced["#{key}__A"], reduced["#{key}__S"] =
Math.stddev_population(reduced["#{key}__VALS"])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 52.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
converted_keys.each do |key|
if reduced["#{key}__CVALS"]
reduced["_NUM_SAMPLES"] ||= reduced["#{key}__CVALS"].length # Keep a single sample count per packet
reduced["#{key}__CA"], reduced["#{key}__CS"] =
Math.stddev_population(reduced["#{key}__CVALS"])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 52.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@telemetry.each do |target_name, packets|
next if target_name == 'UNKNOWN'
FileUtils.mkdir_p(File.join(output_dir, target_name, 'cmd_tlm'))
filename = File.join(output_dir, target_name, 'cmd_tlm', target_name.downcase + '_tlm.txt')
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 52.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@commands.each do |target_name, packets|
next if target_name == 'UNKNOWN'
FileUtils.mkdir_p(File.join(output_dir, target_name, 'cmd_tlm'))
filename = File.join(output_dir, target_name, 'cmd_tlm', target_name.downcase + '_cmd.txt')
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 52.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function _execute_wait
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute_wait(
Function _openc3_script_wait_tolerance
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _openc3_script_wait_tolerance(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function write_array
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_array(
Function _openc3_script_wait_tolerance
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _openc3_script_wait_tolerance(
Function _execute_wait
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute_wait(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Method _openc3_script_wait_implementation_tolerance
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _openc3_script_wait_implementation_tolerance(target_name, packet_name, item_name, value_type, expected_value, tolerance, timeout, polling_rate = DEFAULT_TLM_POLLING_RATE, scope: $openc3_scope, token: $openc3_token, &block)
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
start_char = nil,
read_strip_characters = true,
read_enable_escaping = true,
write_enable_escaping = true,
end_char = 0xC0,
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(write_port_name,
read_port_name,
baud_rate,
parity,
stop_bits,
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
hostname,
write_dest_port,
read_port,
write_src_port = nil,
interface_address = nil,
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(write_port_name,
read_port_name,
baud_rate,
parity,
stop_bits,
Method initialize
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
remote_log_directory,
label,
logging_enabled = true,
cycle_time = nil,
cycle_size = 1_000_000_000,
Function defaultSourceLookup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultSourceLookup(filePath) {
try {
filePath = filePath.split(path.sep).join(path.posix.sep)
// Remove any Windows drive letters
filePath = filePath.replace('C:', '')
Function diff_linesToCharsMunge_
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function diff_linesToCharsMunge_(text) {
var chars = ''
// Walk the text, pulling out a substring for each line.
// text.split('\n') would would temporarily double our memory footprint.
// Modifying text would create many large strings to garbage collect.
Function addConnector
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addConnector(
acediff,
leftStartLine,
leftEndLine,
rightStartLine,