Showing 31 of 31 total issues
Function balisesEtFiltres
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
const balisesEtFiltres = (x, obj) => {
let arabe;
let ordinaux;
let res = x;
let chiffres = true;
- 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 saintChretien
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
acte.saintChretien = (res, obj) => {
const saints = [
['Sainte Marie', 'Saint Basile', 'Sainte Geneviève',
'Saint Odilon',
'Saint Edouard', 'Saint Mélaine', 'Saint Raymond',
File demo-script.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Acte.js demo JS
* http://gtoubiana.github.io/acte/
*
* © 2015-Present, Gilles Toubiana
File spec-JourGregorien.js
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
describe('new acte.Jour().gregorien()', () => {
// Valeurs par défaut
it(
'new acte.Jour().gregorien() = la date grégorienne ' +
'formatée par défaut.',
Function jourRepublicain
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
acte.jourRepublicain = (res, obj) => {
const jours = [
['du Raisin', 'du Safran', 'de la Châtaigne', 'de la Colchique',
'du Cheval', 'de la Balsamine', 'de la Carotte',
'de l\'Amarante',
Function balisesEtFiltres
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
const balisesEtFiltres = (x, obj) => {
let arabe;
let ordinaux;
let res = x;
let chiffres = true;
Function nombreEnLettres
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
acte.nombreEnLettres = (n, r) => {
let mill;
let centl;
let dixl;
let sepunit;
- 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 saintChretien
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
acte.saintChretien = (res, obj) => {
const saints = [
['Sainte Marie', 'Saint Basile', 'Sainte Geneviève', 'Saint Odilon',
'Saint Edouard', 'Saint Mélaine', 'Saint Raymond', 'Saint Lucien',
'Sainte Alix', 'Saint Guillaume', 'Saint Paulin', 'Sainte Tatiana',
Function tabGregorien
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
const tabGregorien = (saisie, limites) => {
// Uniformisation de la saisie
const iesaisie = saisie[0] === '/' ? `1${saisie}` : saisie;
let saisieGregorien = iesaisie.replace(/\W?an\s-?([-MDCLXVI]+)\W?/gi,
- 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 jourRepublicain
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
acte.jourRepublicain = (res, obj) => {
const jours = [
['du Raisin', 'du Safran', 'de la Châtaigne', 'de la Colchique',
'du Cheval', 'de la Balsamine', 'de la Carotte', 'de l\'Amarante',
'du Panais', 'de la Cuve', 'de la Pomme de terre',
File spec-Recettes.js
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
describe('Recettes', () => {
it(
'Recette 1 : Afficher l\'année sur 2 chiffres',
() => {
expect(
Function tabGregorien
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
const tabGregorien = (saisie, limites) => {
// Uniformisation de la saisie
const iesaisie = saisie[0] === '/' ? `1${saisie}` : saisie;
let saisieGregorien = iesaisie.replace(/\W?an\s-?([-MDCLXVI]+)\W?/gi,
Function nombreEnLettres
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
acte.nombreEnLettres = (n, r) => {
let mill;
let centl;
let dixl;
let sepunit;
File docs.js
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** DOCS
* docs.assets
* docs.concat.css
* docs.concat.js
* docs.constants
Function transform
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
transform: function transform(commit) {
/* eslint-disable no-param-reassign,strict */
'use strict';
Function deltaT
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const deltaT = (an) => {
let dt;
const maxindex = 1618 + (delta.length * 2);
if ((an >= 1620) && (an < maxindex)) {
- 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 tabRepublicain
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const tabRepublicain = (saisie, limites) => {
// On remplace les chiffres romains en chiffres arabes
let saisieRepublicain = saisie.replace(/\W?an\s?-?([-MDCLXVI]+)\W?/gi,
// jscs:disable
- 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 tabRepublicain
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const tabRepublicain = (saisie, limites) => {
// On remplace les chiffres romains en chiffres arabes
let saisieRepublicain = saisie.replace(/\W?an\s?-?([-MDCLXVI]+)\W?/gi,
// jscs:disable
Function constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(s, limites) {
let tab = [];
let saisie = s;
this.variables = this.variables || {};
Consider simplifying this complex logical expression. Open
if (saisieGregorien[2] && saisieGregorien[0] < 32 &&
absInt(saisieGregorien[0]) !== 0 &&
saisieGregorien[1] < 13 && saisieGregorien[1] > 0 &&
saisieGregorien[1] !== '' && absInt(saisieGregorien[1]) !== 0 &&
(saisieGregorien[0] <= joursDansLeMois[saisieGregorien[1] - 1])) {