Showing 71 of 183 total issues
Avoid too many return
statements within this function. Open
return ColorMap.valinnainen;
Avoid too many return
statements within this function. Open
return '';
Avoid too many return
statements within this function. Open
return ColorMap.valinnainen;
Avoid too many return
statements within this function. Open
return value;
Function install
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public install(vue: typeof Vue) {
function aikaleimaFnFactory(this: void, format: string) {
const self: any = this;
return function(this: void, value: number) {
if (!Kielet.i18n.locale) {
- 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 directive
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const directive = ($stateParams) => {
return {
restrict: "A",
controller: controller,
scope: {
- 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 restore
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public async restore(event: EditointiKontrolliRestore) {
try {
await this.config.restore!(event.numero);
this.logger.success('Palautettu onnistuneesti');
- 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 install
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public install(vue: typeof Vue, options) {
// Sisällön kääntäminen
vue.prototype.$suodatin = (str: string) => Kielet.searchFn(str);
vue.prototype.$filterBy = function(field: string, query: string) {
- 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 update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const update = (item) => i.$q((resolve, reject) => {
if (item.restangularized) {
return (item.restangularCollection ? item.getList() : item.get())
.then(res => {
return resolve(_.merge(item, res))
- 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 requiredLokalisoituTeksti
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function requiredLokalisoituTeksti(kielet?: readonly Kieli[]) {
return {
required(value: any) {
if (!value) {
return false;
- 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 directive
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const directive = ($compile, $templateCache, $timeout, $animate) => {
let renderAmount = 0;
return {
template: "<div></div>",
- 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"