Showing 132 of 167 total issues
Method discover
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def discover(frameworks_directory)
if frameworks_directory == :defaults
warn("The :defaults argument to Compass::Frameworks.discover is no longer necessary")
return
end
- 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 install_html
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def install_html(from, to, options)
if to =~ /\.haml$/
require 'haml'
to = to[0..-(".haml".length+1)]
if respond_to?(:install_location_for_html)
- 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 initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(glob, &block)
unless block
raise ArgumentError, "A Block must be supplied in order to be watched"
end
@callback = block
- 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
Function getSyntaxPreference
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getSyntaxPreference(defaultSyntax, defaultMarkup) {
mainSyntaxCookie = $.cookie("compass-syntax");
mainSyntax = (mainSyntaxCookie) ? mainSyntaxCookie : defaultSyntax;
changeSyntax(mainSyntax);
- 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 calculate_positions!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calculate_positions!
@images.each_with_index do |image, index|
image.left = (image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100.0) : image.position.value).to_i
next if index == 0
last_image = @images[index-1]
- 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 resolve_additional_import_paths
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def resolve_additional_import_paths
(additional_import_paths || []).map do |path|
if path.is_a?(String) && project_path && !absolute_path?(path)
File.join(project_path, path)
else
- 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 parse_arguments!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_arguments!(parser, arguments)
if arguments.size > 0
parser.options[:project_name] = arguments.shift if File.directory?(arguments.first)
unless arguments.empty?
parser.options[:sass_files] = arguments.dup
- 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 execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def execute
if options[:quiet]
Compass::Frameworks::ALL.each do |framework|
puts framework.name unless framework.name =~ /^_/
end
- 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 parse_arguments!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_arguments!(parser, arguments)
if arguments.size > 0
parser.options[:project_name] = arguments.shift if File.directory?(arguments.first)
unless arguments.empty?
parser.options[:only_sass_files] = absolutize(*arguments)
- 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 assert_legal_color!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assert_legal_color!(color)
unless Sass::Script::Value::Color === color ||
Sass::Script::Tree::Funcall === color ||
(Sass::Script::Value::String === color && color.value == "currentColor")||
(Sass::Script::Value::String === color && color.value == "transparent")
- 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 arg_to_sass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def arg_to_sass(arg, format = :text)
name, default_value = arg
sass_str = ""
if format == :html
ddv = %Q{ data-default-value="#{h(default_value.to_sass)}"} if default_value
- 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 compute_cache_buster
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compute_cache_buster(asset_collection, path, real_path)
file = nil
if asset_collection.asset_cache_buster == :none
nil
elsif asset_collection.asset_cache_buster
- 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"