Showing 3,654 of 3,654 total issues
Function handleKeepStyleReplaceMacro
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleKeepStyleReplaceMacro(
article: IArticle,
contentProfile: IContentProfileV2,
fieldsData: OrderedMap<string, unknown>,
): IMacroProcessor {
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="color-selector__list">
{this.props.options.map((item, index: number) => {
const swatchClasses = classNames('color-selector__swatch', {
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {value1, value2, config} = this.props;
const str1 = (() => {
if (value1 == null) {
Function validateWorkflow
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function validateWorkflow(
mediaItem: IArticle,
allowedWorkflowsConfig: Partial<typeof defaultAllowedWorkflows>,
): {result: true} | {result: false; error: string} {
const allowedWorkflows = {
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const Container = this.props.container;
const ids = (this.props.value ?? []).map(({id}) => id);
const {readOnly} = this.props;
Function getFieldV2
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFieldV2: (fieldEditor, fieldSchema) => {
const fieldConfig: IMediaConfig = {
maxItems:
vocabulary.field_options?.multiple_items?.enabled === true
? vocabulary.field_options.multiple_items.max_items
Function buildRangeFilter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildRangeFilter = (paramsObject, _filters) => {
// created & modified date filters
let hasParams = paramsObject.beforefirstcreated || paramsObject.afterfirstcreated ||
paramsObject.beforeversioncreated || paramsObject.afterversioncreated;
let zeroHourSuffix = 'T00:00:00',
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(contacts, search, notify, $location, $timeout, scope, elem) {
this.scope = scope;
this.elem = elem;
this.containerElem = elem.find('.contacts-list__holder');
this.notify = notify;
Function upload
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.upload = function(dictionary, data, file, success, error, progress) {
var hasId = _.has(dictionary, '_id') && dictionary._id !== null;
var method = hasId ? 'PATCH' : 'POST';
var headers = hasId ? {'If-Match': dictionary._etag} : {};
var sendData: any = {};
Function get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
service.get = function(desk) {
var DEFAULT_CACHE_KEY = '_nodesk';
var key = desk || DEFAULT_CACHE_KEY;
var value = service.getSync(key);
Function HtmlPreview
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function HtmlPreview($sce, $timeout) {
return {
scope: {
sdHtmlPreview: '=',
item: '=?',
Function UserActivityDirective
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function UserActivityDirective(profileService, asset) {
return {
restrict: 'A',
replace: true,
templateUrl: asset.templateUrl('apps/users/views/activity-feed.html'),
Function validateMediaFieldsThrows
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function validateMediaFieldsThrows(validator, metadata, schema, getLabelForFieldId) {
const raiseError = (key) => {
throw gettext('Required field {{key}} is missing. ...', {key: getLabelForFieldId(key)});
};
Function applyImageChanges
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.applyImageChanges = () => {
let flip: 'none' | 'both' | 'horizontal' | 'vertical' = 'none';
const flipH = Math.abs($scope.controls.fliph / 180 % 2);
const flipV = Math.abs($scope.controls.flipv / 180 % 2);
Function MediaCopyMetadataDirective
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function MediaCopyMetadataDirective() {
return {
scope: {
metadata: '=',
validator: '=',
Function PackagesCtrl
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PackagesCtrl($scope, superdesk, api, search) {
$scope.contentItems = [];
function fetchPackages() {
var query = search.query();
Function setRatio
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.setRatio = (ratio) => {
const originalImage = $scope.data.metadata.renditions.original;
let sizeW, sizeH;
Function closeItem
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.closeItem = function(item) {
autosave.hasUnsavedChanges(item).then((hasUnsavedChanges) => {
if (hasUnsavedChanges) {
showUnsavedChangesPrompt().then(({action, closePromptFn}) => {
autosave.settle(item).then(() => {
Function fetchAuthors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchAuthors: function(code) {
var self = this;
self.values.authors = [];
Function MultieditDropdownDirective
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MultieditDropdownDirective(workqueue, multiEdit, $route) {
return {
templateUrl: 'scripts/apps/authoring/multiedit/views/sd-multiedit-dropdown.html',
link: function(scope) {
scope.current = $route.current.params.item;