Showing 817 of 817 total issues
Method generate
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate(site)
if ENV['FAST_BUILDS']
Jekyll.logger.info "Lunr:", 'Skipping creation of search index...'
return
end
Method initialize
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(config = {})
super(config)
if ENV['FAST_BUILDS']
return
Method create
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.create(site, renderer)
if site.is_a?(Jekyll::Page) or site.is_a?(Jekyll::Document)
if defined?(site.date)
date = site.date
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 initialize
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(title, url, author, searchexcerpt, date, categories, tags, is_post, body, collection)
Method generate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def generate(site)
if ENV['FAST_BUILDS']
Jekyll.logger.info "Lunr:", 'Skipping creation of search index...'
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
Properties should be ordered font-size, font-weight, margin, padding Open
Open
font-weight: $bold-font-weight;
- Exclude checks
Properties should be ordered display, font-weight, margin, vertical-align, width Open
Open
vertical-align: top;
- Exclude checks
Properties should be ordered line-height, margin, padding-left Open
Open
padding-left: 4rem;
- Exclude checks
Rule declaration should be followed by an empty line Open
Open
}
- Exclude checks
@include declaration should be preceded by an empty line Open
Open
@include media($mobile) {
- Exclude checks
Rule declaration should be preceded by an empty line Open
Open
&.left {
- Exclude checks
Rule declaration should be followed by an empty line Open
Open
}
- Exclude checks
Selector should have depth of applicability no greater than 3, but was 6 Open
Open
tfoot tr td * {
- Exclude checks
Rule declaration should be preceded by an empty line Open
Open
li {
- Exclude checks
Avoid qualifying class selectors with an element. Open
Open
.inline-links a.is-current {
- Exclude checks
Rule declaration should be preceded by an empty line Open
Open
.inner {
- Exclude checks
Rule declaration should be followed by an empty line Open
Open
}
- Exclude checks
Line should be indented with spaces, not tabs Open
Open
padding:10px 20px;
- Exclude checks
Rule declaration should be followed by an empty line Open
Open
}
- Exclude checks
Selector risk__yellow
should be written in lowercase with hyphens Open
Open
&.risk__yellow {
- Exclude checks