Showing 11 of 16 total issues
Function exports
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
Function writeChangelog
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeChangelog(commits) {
var module = this;
debug('writing change log');
var sections = this.organizeCommits(commits, this.options.sections);
Function organizeCommit
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function organizeCommit(sections, commit) {
var section = commit.type ? sections[commit.type] : grepSection(sections, commit) ;
var component = commit.component ? commit.component.toLowerCase() : this.emptyComponent;
- 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 organizeCommits
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function organizeCommits(commits, defaultSections) {
commits = commits ? commits : [];
var sections = {
BREAKING : {
Function parseRawCommit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function parseRawCommit(raw) {
debug('parsing raw commit');
if (!raw) {
return null;
}
- 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 printCommit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function printCommit(commit, printCommitLinks, template) {
const commitLink = format('%s\n (%s', commit.subject, this.linkToCommit(commit.hash));
const closes = commit.closes.length ? commit.closes.map(this.linkToIssue, this).join(', ') : '';
- 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 parseRawCommit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseRawCommit(raw) {
debug('parsing raw commit');
if (!raw) {
return null;
}
Function getProviderLinks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getProviderLinks() {
debug('getting provider links');
// This is just in case they differ their urls at some point in the future.
// Also brings the posibility of adding more providers
var providerLinks = {
Function loadTemplateFile
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTemplateFile(data) {
this.log('debug','loading template from', this.options.template);
this.log('debug', 'loading commit template from ', this.options.commit_template);
const { printCommit, linkToCommit, linkToIssue, options } = this;
Function getGitRepoInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getGitRepoInfo(initialUrl) {
const [
initial,
protocol,
service,
- 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 getProviderLinks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getProviderLinks() {
debug('getting provider links');
// This is just in case they differ their urls at some point in the future.
// Also brings the posibility of adding more providers
var providerLinks = {
- 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"