Showing 29 of 78 total issues
Function request
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
WebDAVClient.prototype.request = function(verb, url, headers, data, responseType,
onSuccess, onError) {
Function ip
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
AWSValidator.prototype.ip = function(ip) {
if (typeof ip !== 'string') { return false; }
var parts = ip.split('.');
if (parts.length !== 4) { 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 mount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var mount = function(bucket, region, access, secret, opt_callbacks) {
Function put
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
WebDAVClient.prototype.put = function(url, data, opt_headers, onSuccess, onError) {
Function readFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
WebDAVFS.prototype.readFile = function(options) {
var url = this.url + options.path;
var headers = null;
if (options.range && (options.range.start || options.range.end)) {
- 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 true;
Function mount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var mount = function(bucket, region, access, secret, opt_callbacks) {
window.s3fs = new S3FS(bucket, region, access, secret);
var callbacks = opt_callbacks || {};
- 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 restoreCredentials
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var restoreCredentials = function() {
if (!chrome.storage) { return; }
chrome.storage.sync.get(keys, function(items) {
for (var key in items) {
var value = items[key];
- 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 restoreCredentials
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var restoreCredentials = function() {
if (!chrome.storage) { return; }
chrome.storage.sync.get(keys, function(items) {
for (var key in items) {
var value = items[key];
- 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"