npm/marky-markdown

View on GitHub

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) {
Severity: Minor
Found in lib/plugin/youtube.js - About 35 mins to fix

    Function fence has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      md.renderer.rules.fence = function (tokens, idx, options, env, slf) {
    Severity: Minor
    Found in lib/plugin/language-alias.js - About 35 mins to fix

      Function image has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        md.renderer.rules.image = function (tokens, idx, options, env, self) {
      Severity: Minor
      Found in lib/plugin/gravatar.js - About 35 mins to fix

        Function link_open has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          md.renderer.rules.link_open = function handleLink (tokens, idx, options, env, self) {
        Severity: Minor
        Found in lib/plugin/nofollow.js - About 35 mins to fix

          Function heading_open has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            md.renderer.rules.heading_open = function (tokens, idx, opts, env, self) {
          Severity: Minor
          Found in lib/plugin/heading-links.js - About 35 mins to fix

            Function fence has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              md.renderer.rules.fence = function (tokens, idx, options, env, slf) {
            Severity: Minor
            Found in lib/plugin/code-wrap.js - About 35 mins to fix

              Function replaceTagAttribute has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function replaceTagAttribute (html, tag, attribute, buildUrl, repository) {
              Severity: Minor
              Found in lib/plugin/github.js - About 35 mins to fix

                Function image has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  md.renderer.rules.image = function (tokens, idx, options, env, self) {
                Severity: Minor
                Found in lib/plugin/github.js - About 35 mins to fix

                  Function defaultRender has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    var defaultRender = md.renderer.rules.link_open || function (tokens, idx, options, env, self) {
                  Severity: Minor
                  Found in lib/plugin/nofollow.js - About 35 mins to fix

                    Function heading_open has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      md.renderer.rules.heading_open = function (tokens, idx, options, env, self) {
                    Severity: Minor
                    Found in lib/plugin/packagize.js - About 35 mins to fix

                      Function image has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        md.renderer.rules.image = function (tokens, idx, options, env, self) {
                      Severity: Minor
                      Found in lib/plugin/cdn.js - About 35 mins to fix

                        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
                        Severity: Minor
                        Found in lib/plugin/youtube.js - About 35 mins to fix

                        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) {
                        Severity: Minor
                        Found in lib/plugin/github.js - About 35 mins to fix

                        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']
                          }
                        Severity: Minor
                        Found in lib/sanitize.js - About 35 mins to fix

                        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
                        Severity: Minor
                        Found in lib/plugin/cdn.js - About 35 mins to fix

                        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
                        Severity: Minor
                        Found in lib/render.js - About 35 mins to fix

                        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 }
                        Severity: Major
                        Found in lib/gfm/image.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return true
                          Severity: Major
                          Found in lib/plugin/html-heading.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return false
                            Severity: Major
                            Found in lib/gfm/link.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                return true
                              Severity: Major
                              Found in lib/gfm/image.js - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language