Showing 4,841 of 7,782 total issues
Function _deconstructPacket
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export function _deconstructPacket(data: ArrayBufferView | unknown & { buffer?} | undefined, buffers: unknown[]): unknown {
if (!data) return data;
if (_isBinary(data)) {
const placeholder = { _placeholder: true, num: buffers.length };
- 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 layoutregion$mold$
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function layoutregion$mold$(out) {
var uuid = this.uuid,
pos = this.getPosition(),
BL = zul.layout.Borderlayout,
noCenter = pos != BL.CENTER,
- 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 _scroll
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
_scroll(): void {
var current = new Date(),
delta = current.valueOf() - this.lastScrolled!.valueOf();
this.lastScrolled = current;
if (this.opts.scroll == window) {
- 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 _updateDrag
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
_updateDrag(pt: zk.Offset, evt: zk.Event): void {
if (!this.dragging) {
let v = this.opts.initSensitivity;
if (v && pt[0] <= _initPt[0] + v && pt[0] >= _initPt[0] - v
&& pt[1] <= _initPt[1] + v && pt[1] >= _initPt[1] - v)
- 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 zkx
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export function zkx(wi?: WidgetInfo, extra?: ExtraInfo, aucmds?: AuCmds, js?: string): void { //extra is either delay (BL) or [stub, filter] (AU)
zk.mounting = true;
try {
if (js) jq.globalEval(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"
Further reading
Function create
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const escapeFunc: string = context.options[0] && context.options[0]['escapeFunc'] || 'escape';
- 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 get
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public V get(Object src) {
WaitLock lock = null;
for (;;) {
Info ri = null;
Method renderBegin
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void renderBegin(Component comp, Map clientEvents, String specialRendererOutput,
boolean lookup) {
if (_2ndChild.isEmpty())
_jsout.append("zkx(");
else if (_2ndChild.get(0) == Boolean.TRUE)
Method CompositeExpression
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public AstCompositeExpression CompositeExpression() throws ParseException {
/*@bgen(jjtree) CompositeExpression */
AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
Method createProxyIfAny
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <T> T createProxyIfAny(T origin, Annotation[] annotations) {
if (origin == null)
return null;
if (origin instanceof FormProxyObject) {
Method renderTabpanel
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void renderTabpanel(Tabpanel item, final Object data, final int index) throws Exception {
final Tabbox tabbox = item.getTabbox();
final Tabpanels tabpanels = tabbox.getTabpanels();
final int size = tabbox.getModel().getSize();
final String tmn = "model";
File BindUiLifeCycle.java
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* BindUiLifeCycle.java
Purpose:
Description:
Method render
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void render(ActionContext ac, boolean nested) throws DspException, IOException {
//at least items or end must be specified
if (!nested || (_itemsSpecified && _items == null) || (_endSpecified && _end < _beg)
|| (!_itemsSpecified && !_endSpecified) || !isEffective())
return;
Function tick
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tick() {
var n = nodes.length,
m = links.length,
q,
i, // current index
Method init
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void init(Component comp, Object viewModel, Map<String, Object> initArgs) {
if (_init)
throw new UiException("binder is already initialized");
_init = true;
Method render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public String render(final Component owner, final Object data, final int index) {
final Selectbox self = (Selectbox) owner;
final Template tm = self.getTemplate("model");
if (tm == null)
return Objects.toString(data);
Method fixGroupsInfoBeforeInsert
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void fixGroupsInfoBeforeInsert(Component newChild, Component refChild, boolean isReorder) {
if (_isReplacingItem) //@see Renderer#render
return; //called by #insertBefore(), skip handling GroupInfo
if (newChild instanceof Listgroupfoot) {
Function zoom
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.behavior.zoom = function() {
var xyz = [0, 0, 0],
event = d3.dispatch("zoom");
function zoom() {
File Listitem.java
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Listitem.java
Purpose:
Description:
CollectionsX
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
public class CollectionsX {
/** An enumeration on top of a collection or iterator.
*/
public static final class CollectionEnumeration<E> implements Enumeration<E> {
private final Iterator<? extends E> _iter;