Showing 4 of 4 total issues
File command.rb
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "metanorma/cli/compiler"require "metanorma/cli/generator"require "metanorma/cli/collection"require "metanorma/cli/git_template"require "metanorma/cli/thor_with_config"
Method run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def run if Cli.writable_templates_path? if name && document_path.exist? return unless overwrite?(document_path)
- Read upRead up
Method calculate_base_path!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def calculate_base_path!(my_options, manifest_path = nil) config_file = options[:config] if manifest_path.nil? if config_file.nil? # If no config file is given, use the current working directory
- Read upRead up
Method compile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compile(file_name = nil) if file_name && !options[:version] documents = select_wildcard_documents(file_name) || [file_name] documents.each { |document| compile_document(document, options.dup) }
- Read upRead up