Showing 28 of 97 total issues
Function singleJob
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var singleJob = function (jobCallback) {
dbt.getVersInLang(damId, verseJob.bookId, verseJob.chapterId, verseJob.verseStart, verseJob.verseEnd,
function (error, translatedArray) {
if (error) {
console.info('VerseWorker :: Cannot process verse lookup to ' + targetLanguage + ' for verse: ' + verse + ' : ' + error);
Function dbtConnector
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var dbtConnector = function () {
var service = {
/**
* Returns vers with given parameters fetched from dbt.io
- 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 protokollService
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var protokollService = function() {
var controller = {
/**
- 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 showSettings
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.showSettings = function (ev) {
$mdDialog.show({
controller: function ($scope, $mdDialog) {
$scope.settings = TranslationService.getSettings();
$scope.hide = function () {
Avoid deeply nested control flow statements. Open
if (!$scope.message.text) {
$scope.message.text = '';
}
Function protocolService
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var protocolService = function() {
var cache = new NodeCache({
stdTTL: 60 * 60 * 18,
checkperiod: 60 * 60 * 3
- 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 getVersInLang
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
getVersInLang: function (damId, bookId, chapterId, verseStart, verse_end, callback) {
Function postmarkConnector
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var postmarkConnector = function() {
var client = new postmark.Client(config.keys.postmark.apiToken);
var 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"