Showing 65 of 65 total issues
Function html_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.html_block = function (tokens, idx, options, env, self) {
Function fence
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.fence = function (tokens, idx, options, env, slf) {
Function image
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.image = function (tokens, idx, options, env, self) {
Function link_open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.link_open = function handleLink (tokens, idx, options, env, self) {
Function heading_open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.heading_open = function (tokens, idx, opts, env, self) {
Function fence
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.fence = function (tokens, idx, options, env, slf) {
Function replaceTagAttribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function replaceTagAttribute (html, tag, attribute, buildUrl, repository) {
Function image
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.image = function (tokens, idx, options, env, self) {
Function defaultRender
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var defaultRender = md.renderer.rules.link_open || function (tokens, idx, options, env, self) {
Function heading_open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.heading_open = function (tokens, idx, options, env, self) {
Function image
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
md.renderer.rules.image = function (tokens, idx, options, env, self) {
Function isYoutubeIframe
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function isYoutubeIframe (content) {
// look for the src attribute's value
var attr = content.match(/<\s*iframe[^>]*\bsrc\s*=\s*/)
if (attr) {
// mark the location and figure out what kind of quotation mark is delimiting the 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
Function replaceTagAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function replaceTagAttribute (html, tag, attribute, buildUrl, repository) {
// look for the attribute's value
var regex = new RegExp('<\\s*' + tag + '[^>]*\\b' + attribute + '\\s*=\\s*', 'i')
var attr = html.match(regex)
if (attr) {
- 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 getSanitizerConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getSanitizerConfig (options) {
options = options || {
headingAnchorClass: 'anchor',
headingSvgClass: ['octicon', 'octicon-link']
}
- 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 exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (md, opts) {
if (!opts) return
if (!opts.package) return
if (!opts.package.name) return
if (!opts.package.version) return
- 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 getParser
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render.getParser = function (options) {
var mdOptions = {
html: true,
langPrefix: 'highlight ',
linkify: options.linkify
- 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
Avoid too many return
statements within this function. Open
if (typeof state.env.references === 'undefined') { return false }
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return true