Showing 4,841 of 7,782 total issues
Function scale
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
scale(digits: number): void {
var val = this._value || '',
n = val.length;
if (n)
if (digits > 0) {
- 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 _constructPacket
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function _constructPacket(data: unknown | undefined, files: unknown[]): unknown {
if (!data) return data;
if (Array.isArray(data)) {
for (let i = 0; i < data.length; i++) {
data[i] = _constructPacket(data[i] as never, files);
- 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 addAft
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function addAft(wgt: zk.Widget, ...codes: string[]): void {
const p = wgt.parent,
onSizeChildren: zk.Widget[] = [],
fn = function (child: zk.Widget): void {
var act = _beforeAction(child, 'show') as never;
- 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 delayFunction
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function delayFunction(uuid: string, func: () => void, opts?: Partial<{ timeout: number; urgent: boolean }>): void {
if (uuid && typeof func == 'function') {
if (!opts)
opts = {};
var timeout = opts.timeout,
- 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 run
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public final void run(IN input) {
C inputClass = getClass(input);
doDebug("");
Method parseToMap
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final Map<String, String> parseToMap(Map<String, String> map, String rawData) {
if (rawData == null || rawData.trim().length() == 0) {
if (map != null)
return map;
return Collections.emptyMap();
Method coerceToTypeForSetValue
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static final Object coerceToTypeForSetValue(final Object obj,
Class<?> type) throws ELException {
if (type == null || Object.class.equals(type) ||
(obj != null && type.isAssignableFrom(obj.getClass()))) {
return obj;
Method process
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void process(HttpServletRequest request, HttpServletResponse response, String content)
throws ServletException, IOException {
if (log.isDebugEnabled())
log.debug("Content to filter:\n{}", content);
Method init
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void init() throws ServletException {
final ServletConfig config = getServletConfig();
final ServletContext ctx = getServletContext();
ctx.setAttribute(ATTR_UPDATE_SERVLET, this);
Method doDeactivate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final void doDeactivate(Execution exec) {
// if (log.finerable()) log.finer("Deactivating "+desktop);
final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
final Desktop desktop = exec.getDesktop();
Method lookupParameterNames
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public String[] lookupParameterNames(AccessibleObject methodOrCtor, boolean throwExceptionIfMissing) {
Class<?>[] types = null;
Class<?> declaringClass = null;
String name = null;
Method resolveParameter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected Object resolveParameter(Annotation[] parmAnnos, Class<?> paramType, Method method, int index) {
Object val = null;
boolean hitResolver = false;
Default defAnno = null;
for (Annotation anno : parmAnnos) {
Method doInitRenderer
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doInitRenderer() {
if (getPage() == null)
return;
final Renderer renderer = new Renderer();
try {
Method fixGroupsInfoAfterRemove
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void fixGroupsInfoAfterRemove(Component child, int index) {
if (!_isReplacingItem) { //@see Renderer#render
//called by #removeChild(), handling GroupInfo if !isReplcingItem
if (child instanceof Listgroup) {
int[] prev = null, remove = null;
Function extend
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
Function _checkValidNamespace
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const _checkValidNamespace = function _checkValidNamespace(element) {
let parent = getParentNode(element);
// In JSDOM, if we're inside shadow DOM, then parentNode
// can be null. We just simulate parent in this case.
Function computeWeekdaysParse
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
Function _create0
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _create0(parent: zk.Widget, e: HTMLElement, args: unknown, cwgts: zk.Widget[]): void {
var ifc = _eval(parent, e.getAttribute('if'), args),
unless = _eval(parent, e.getAttribute('unless'), args);
if ((ifc == null || ifc) && (unless == null || !unless)) {
var tn = e.tagName, wgt: zk.Widget;
Function create
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
create(context) {
return {
CallExpression(node) {
const { parent, callee } = node;
Method myGetCloseMethod
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final
Method myGetCloseMethod(final Class<?> cls, final String name,
final Class<?>[] argTypes, final boolean bySubclass)
throws NoSuchMethodException {
// assert argTypes != null: "Caller shall handle null";