Showing 472 of 2,519 total issues
Function 19
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
/***/ function(module, exports, __webpack_require__) {
;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){
__webpack_require__(18);
- 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
Method getColor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public int getColor() {
byte alpha;
if (this.a == null) {
alpha = (byte) 255;
} else {
- 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
Method getInstance
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static IntegerFormatter getInstance() {
if (cachedFormatter == null) {
synchronized (IntegerFormatter.class) {
if (cachedFormatter == null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- 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
Method updateScreenBitmap
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void updateScreenBitmap() {
if (!mIsRunning) {
return;
}
Activity activity = mActivityTracker.tryGetTopActivity();
- 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 19
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
/***/ function(module, exports, __webpack_require__) {
;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){
__webpack_require__(18);
- 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 method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return Long.valueOf(parser.getAttributeValue(null, "value"));
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return res;
Avoid too many return
statements within this method. Open
return value;
Avoid too many return
statements within this method. Open
return res;
Avoid too many return
statements within this method. Open
return res;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return res;
Avoid too many return
statements within this method. Open
return res;
Avoid too many return
statements within this method. Open
return;