codeclimate/javascript-test-reporter

View on GitHub
git_info.js

Summary

Maintainability
A
25 mins
Test Coverage

Function committedAt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  committedAt: function(cb) {
    childProcess.exec("git log -1 --pretty=format:%ct", function (error, stdout, stderr) {
      var result = null;
      var timestamp = null;
      if (stdout) {
Severity: Minor
Found in git_info.js - About 25 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

There are no issues that match your filters.

Category
Status
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy