hakanensari/peddler

View on GitHub

Showing 4 of 4 total issues

Method split_long_comment_line has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

def split_long_comment_line(line, base_indent: 0, wrap_indent: 0, max_line_length: MAX_LINE_LENGTH)
max_width = max_line_length - base_indent - 2 # Account for the space and `#`
 
current_line = []
lines = []
Severity: Minor
Found in lib/generator/formatter.rb - About 2 hrs to fix

Method tags has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def tags
output = parameters.map do |param|
param_type = param["type"] ? param["type"].capitalize : "Object"
param_type = "Hash" if param["schema"]
if param_type == "Array"
Severity: Minor
Found in lib/generator/operation.rb - About 1 hr to fix

Method handle_duplicate_operations has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

def handle_duplicate_operations
# Group by operation ID
operation_map = operations.group_by { |op| snakecase(op.operation["operationId"]) }
 
# Find duplicates
Severity: Minor
Found in lib/generator/api.rb - About 45 mins to fix

Method method_definition has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def method_definition
method_name = snakecase(operation.delete("operationId"))
 
required_params = parameters.select { |p| p["required"] }&.map { |p| snakecase(p["name"]) } || []
optional_params = parameters.reject do |p|
Severity: Minor
Found in lib/generator/operation.rb - About 35 mins to fix
Severity
Category
Status
Source
Language