Showing 5,781 of 10,536 total issues
Function link
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, elem, attrs) {
// 生成随机字符串作为验证码
function generateCode() {
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
var codeLength = 5;
Function QuillEditorExample
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const QuillEditorExample = () => {
return (
<Fragment>
<PageHeader
title="WYSIWYG Editor"
Function Inbox
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Inbox = () => {
// Hook
const { data: paginationData, meta: paginationMeta, handler: paginationHandler } = usePagination(emailIds, 10);
const {
selectedItems,
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp, id_):
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
access_control(req)
Function on_get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp, id_, gid):
access_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_ENERGY_STORAGE_CONTAINER_ID')
Function on_get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_get(req, resp, id_, lid):
access_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_ENERGY_STORAGE_CONTAINER_ID')
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp, id_):
"""Handles POST requests"""
admin_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp, id_):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp, id_):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_delete
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_delete(req, resp, id_):
admin_control(req)
if not id_.isdigit() or int(id_) <= 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_USER_ID')
Function on_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function makeComponentTemplate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) {
bindings = bindings || {};
// Bind once prefix
var prefix = ng.version.minor >= 3 ? '::' : '';
// Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`
Function serialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function serialize(object) {
var out;
if (angular.isElement(object)) {
object = angular.element(object);
Function $ExceptionHandlerProvider
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
angular.mock.$ExceptionHandlerProvider = function() {
var handler;
/**
* @ngdoc method
Function compile
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compile: function(elem, attr) {
if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;
var fn = $parse(attr.ngClick);
return function(scope, elem, attr) {
Function split_meta_hash
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function split_meta_hash( meta_string ) {
var meta = meta_string.split( "" ),
parts = [ "" ],
in_quotes = false;
Function drawSeriesBars
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSeriesBars(series) {
function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
var points = datapoints.points, ps = datapoints.pointsize;
for (var i = 0; i < points.length; i += ps) {