Showing 3,654 of 3,654 total issues
Function ContentService
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function ContentService(api, templates, desks, packages: IPackagesService, archiveService, notify,
$filter, $q, $rootScope, session, renditions) {
Function getInitialState
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
item: {saved: T; autosaved: T},
profile: IContentProfileV2,
userPreferencesForFields: IStateLoaded<T>['userPreferencesForFields'],
spellcheckerEnabled: boolean,
fieldsAdapter: IFieldsAdapter<T>,
Function MonitoringView
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$rootScope,
authoringWorkspace: AuthoringWorkspaceService,
pageTitle,
$timeout,
$location,
Function MonitoringGroup
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
cards,
api,
authoringWorkspace: AuthoringWorkspaceService,
$timeout,
superdesk,
Function AuthoringHeaderDirective
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
api,
authoringWidgets,
$rootScope,
archiveService,
metadata,
Function SearchParameters
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function SearchParameters($location, asset, tags, metadata, common, desks,
userList, ingestSources, subscribersService, $templateCache, search) {
Function registerExtensions
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
extensionLoaders: Array<IExtensionLoader>,
superdesk,
modal,
privileges,
lock,
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
var webpackConfig = makeConfig(grunt);
return {
options: {
Function _archive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this._archive = function (exp, id, locals, pass, description) {
var _initStores = this._initStores;
return function (newVal, oldVal) {
var watchObj;
_initStores(id);
Function runAnalysis
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runAnalysis() {
const dataBeforeLoading = this.state.data;
this.setState({data: 'loading'}, () => {
const {guid, language, headline, body_html, abstract} = this.props.article;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let classes = classNames('sd-searchbar', {
[`sd-searchbar--${this.props.type}`]: this.props.type,
'sd-searchbar--expanded': this.props.type === 'expanded' || this.props.type === undefined,
'sd-searchbar--focused': this.props.focused,
Function getAnnotationInputWithKnowledgeBase
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAnnotationInputWithKnowledgeBase(superdesk: ISuperdesk) {
class AnnotationInputWithKnowledgeBaseComponent
extends React.Component<IPropsAnnotationInputComponent & IPropsConnected> {
componentDidMount() {
const {generateFilterForServer} = superdesk.forms;
Function prepareForDropping
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const prepareForDropping = (
event: React.DragEvent<HTMLDivElement>,
image: IImage | null,
) => {
if (image == null) {
Function duplicateItems
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function duplicateItems(items: Array<IArticle>, destination: ISendToDestination): Promise<Array<IArticle>> {
return Promise.all(
items.map((item) => {
const payload = (() => {
if (destination.type === 'personal-space') {
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props: IProps) {
super(props);
if (this.props.original?._id == null) {
this.state = {
Function getArticleAdapter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getArticleAdapter(): IAuthoringReactArticleAdapter {
const customFieldVocabularies = getCustomFieldVocabularies();
const oldFormatCustomFieldIds: Set<IOldCustomFieldId> = new Set(
customFieldVocabularies
Function initialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize() {
Promise.all([
httpRequestJsonLocal<IRestApiResponse<IArticle>>({
method: 'GET',
path: `/archive/${this.props.article._id}?version=all`,
Function applyMiddleware
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function applyMiddleware(_item: IArticle): Promise<IArticle> {
// Custom field types with `onTemplateCreate` defined. From all extensions.
const fieldTypes: {[id: string]: ICustomFieldType<any, any, any, any>} = {};
Object.values(extensions).forEach((ext) => {
Function toggleField
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleField(fieldId: string) {
if (!this.state.initialized) {
return;
}
Function scheduleIfShouldUpdate
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scheduleIfShouldUpdate(event, data) {
if (data && data.from_stage && data.from_stage === scope.group._id) {
// item was moved from current stage
extendItem(data.item, {
gone: true,