Showing 75 of 149 total issues
Function nudify
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function nudify(args, events) {
const process = exec(args)
let cancelled = false
process.on('error', (error) => {
Function setup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
async setup() {
this.enabled = false
if (!system.online) {
this.error = new Warning('There is no Internet connection. Please make sure you are connected before starting.')
Function parseArgs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseArgs(args) {
args.forEach((value) => {
if (isNil(value)) {
// YEP
} else if (value instanceof Logger.Logger) {
Function nextMask
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
get nextMask() {
const { scaleMode, useColorPaddingRemoval } = this.photo
const { waifu } = this.photo.preferences.advanced
switch (this.id) {
Function install
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
async install(filepath) {
const powerPath = getPowerPath()
// Removing the previous installation
try {
- 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 config
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
get config() {
return {
accessToken: this.accessToken,
captureUncaught: false,
captureUnhandledRejections: false,
Function extractSeven
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function extractSeven(path, destinationPath) {
const { is, platform } = require('electron-util')
const { extractFull } = require('node-7z')
const def = deferred()
Function add
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
add(file, params = {}) {
const photo = new Photo(file, params)
if (!settings.app.duplicates) {
const exists = this.getPhotoById(photo.id)
- 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 nextMask
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
get nextMask() {
const { scaleMode, useColorPaddingRemoval } = this.photo
const { waifu } = this.photo.preferences.advanced
switch (this.id) {
- 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 getMasksPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const getMasksPath = (...args) => {
let folder
if (process.env.BUILD_PORTABLE) {
folder = getPath('temp')
- 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 report
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
async report() {
if (this.reported) {
return this
}
- 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 transform
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const transform = (photoPreferences, input, output) => {
if (!output) {
output = input
}
- 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 _getLatestCompatible
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_getLatestCompatible(releases) {
const currentVersion = `v${process.env.npm_package_version}`
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.10')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'])
- 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 _getLatestCompatible
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_getLatestCompatible(releases) {
const currentVersion = `v${process.env.npm_package_version}`
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'minimum'], 'v0.1.0')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum'])
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
async install(filepath) {
const waifuPath = getWaifuPath()
// Removing the previous installation
try {
- 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 make
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static make() {
return new Proxy(new this(), {
get: (obj, prop) => {
if (prop in obj) {
return obj[prop]
- 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 download
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function download(url, options = {}) {
const events = new EventEmitter()
let cancelled = 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 canShowGenerate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
get canShowGenerate() {
const { scaleMode, useColorPaddingRemoval } = this.photo
switch (this.id) {
case STEP.CORRECT:
- 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 boot
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static async boot() {
const logDir = getPath('userData', 'logs', new Date().toJSON().slice(0, 10))
fs.ensureDirSync(logDir)
// logger setup
- 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
Avoid too many return
statements within this function. Open
return scaleMode