Showing 286 of 880 total issues
Function read
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
read(bytes) {
if (this.exhausted) {
return null;
}
- 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 disposeFiber
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function disposeFiber(fiber, force) {
let { stateNode, effectTag } = fiber;
if (!stateNode) {
return;
}
- 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 setInsertPoints
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function setInsertPoints(children) {
for (let i in children) {
let child = children[i];
if (child.disposed) {
continue;
- 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 render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className='loading2019'>
<div className='icon'>
<img style={{width: '1.5rem', height: '1.5rem'}} src='http://s.qunarzz.com/dev_test_2/loading4.gif'/>
Function getModernOffsets
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getModernOffsets(node) {
var selection = window.getSelection && window.getSelection();
if (!selection || selection.rangeCount === 0) {
return null;
Function getModernOffsets
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getModernOffsets(node) {
var selection = window.getSelection && window.getSelection();
if (!selection || selection.rangeCount === 0) {
return null;
Function initStorageSync
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function initStorageSync (storageCache) {
if (typeof ReactQuick !== 'object') {
return;
}
var apis = ReactQuick.api; // eslint-disable-line
Function dispatchEvent
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function dispatchEvent(e) {
const instance = this.reactInstance;
if (!instance || !instance.$$eventCached) {
return;
}
Function applybeforeUpdateHooks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function applybeforeUpdateHooks(
fiber,
instance,
newProps,
newContext,
- 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 safeClone
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function safeClone (originVal) {
let temp = originVal instanceof Array ? [] : {};
for (let item in originVal) {
if (hasOwnProperty.call(originVal, item)) {
let value = originVal[item];
- 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 traverseAllChildren
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function traverseAllChildren(
children,
nameSoFar,
callback,
bookKeeping
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
update(node, props) {
if (props.checked != null) {
syncValue(node, "checked", !!props.checked);
}
const isActive = node === node.ownerDocument.activeElement;
- 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 makeProps
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function makeProps(type, config, props, children, len) {
// Remaining properties override existing props
let defaultProps, propName;
for (propName in config) {
if (
- 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 diffProps
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function diffProps(dom, lastProps, nextProps, fiber) {
let isSVG = fiber.namespaceURI === NAMESPACE.svg;
let tag = fiber.type;
let continueProps = skipProps;
if (!isSVG && rform.test(fiber.type)) {
Function constructor
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor({
url = '',
header = '',
formData = {},
success = () => {},
Function updateOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function updateOptions(node, multiple, propValue, setDefaultSelected) {
var options = node.options;
if (multiple) {
var selectedValues = propValue;
Function escapeHtml
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function escapeHtml(string) {
var str = '' + string;
var match = matchHtmlRegExp.exec(str);
if (!match) {
Function disposeFibers
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function disposeFibers(fiber) {
let list = [fiber.oldChildren, fiber.children];
for (let i = 0; i < 2; i++) {
let c = list[i];
if (c) {
- 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 refreshComponent
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function refreshComponent (instances, wx, uuid) {
if(wx.disposed){
return
}
let pagePath = Object(_getApp()).$$pagePath;
- 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 dispatchEvent
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function dispatchEvent(e) {
let eventType = toLowerCase(e.type);
if (eventType == "message") {
//处理支付宝web-view组件的dataset为空的BUG
if (webview.instance && webview.cb) {
- 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"