Showing 415 of 610 total issues
Avoid too many return
statements within this function. Open
return event
Avoid too many return
statements within this function. Open
return { type: 'EDIT', side: outdatedSide.name }
Avoid too many return
statements within this function. Open
return new SyncError({
sideName,
err: remoteErrors.wrapError(err, doc),
doc
})
Avoid too many return
statements within this function. Open
return { action: 'scan', kind, path: relativePath, ino }
Avoid too many return
statements within this function. Open
return match(parent, true, pattern)
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return { type: 'ADD', side: outdatedSide.name }
Avoid too many return
statements within this function. Open
return new SyncError({ sideName, err, code: EXCLUDED_DIR_CODE, doc })
Avoid too many return
statements within this function. Open
return new SyncError({ sideName, err, doc })
Avoid too many return
statements within this function. Open
return null
Avoid too many return
statements within this function. Open
if (docB.path.startsWith(docA.path + sep)) return -1
Avoid too many return
statements within this function. Open
return { action: 'modified', kind, path: relativePath, ino }
Avoid too many return
statements within this function. Open
if (docA.path.startsWith(docB.path + sep)) return 1
Avoid too many return
statements within this function. Open
if (docB.path.startsWith(docA.path + sep)) return -1
Avoid too many return
statements within this function. Open
return { type: 'NULL' }
Function setEnabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports.setEnabled = enabled => {
autoLauncher
.isEnabled()
.then(was => {
if (was !== enabled) {
- 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 addFileManagerShortcut
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports.addFileManagerShortcut = config => {
if (platform === 'win32' && major >= 10) {
win10PinToHome(config.syncPath)
} else if (platform === 'win32' && major >= 6) {
winAddLink(config.syncPath)
- 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 deleteFileAsync
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async deleteFileAsync(side /*: SideName */, doc /*: SavedMetadata */) {
log.debug({ path: doc.path }, 'deleteFileAsync')
const file /*: ?SavedMetadata */ = await this.pouch.bySyncedPath(doc.path)
if (!file) {
- 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 init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const init = (app, listener) => {
tray = new Tray(nativeImage.createEmpty())
// XXX: updating the status should always come after the initialization of the
// `tray` as we use it.
- 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 default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.default = async function (configuration) {
const { execSync } = require('child_process')
const whoami = 'customSign.js'
- 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"