Showing 3,654 of 3,654 total issues
Function AggregateSettings
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AggregateSettings(desks, workspaces, session, preferencesService, WizardHandler, $filter) {
return {
templateUrl: 'scripts/apps/monitoring/views/aggregate-settings-configuration.html',
scope: {
modalActive: '=',
Function SpellcheckService
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SpellcheckService($q, api, dictionaries, $rootScope, $location, _, preferencesService) {
var PREFERENCES_KEY = 'spellchecker:status',
lang = getUserInterfaceLanguage(),
dict = {} as any,
ignored = {},
Function render
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {rundownAction} = this.state;
const rundownItemOpen = rundownAction != null && this.state.rundownItemAction != null;
const rundownsListVisible = rundownAction?.fullWidth !== true && !rundownItemOpen;
Function PublishQueueController
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function PublishQueueController($scope, subscribersService, api, $q, notify, $location, ingestSources,
vocabularies) {
$scope.subscribers = null;
$scope.subscriberLookup = {};
$scope.ingestProviders = null;
Function ArticleEditDirective
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ArticleEditDirective(
autosave,
metadata,
$filter,
superdesk,
Similar blocks of code found in 2 locations. Consider refactoring. Open
angular
.module('superdesk.apps.authoring.track-changes.inline-comments', [
'superdesk.apps.authoring.widgets',
])
.config([
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 235.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
angular
.module('superdesk.apps.authoring.track-changes.suggestions', [
'superdesk.apps.authoring.widgets',
])
.config([
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 235.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File SearchService.ts
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
getParameters,
getExcludeFacets,
CORE_PROJECTED_FIELDS,
DEFAULT_LIST_CONFIG,
Function ItemCarouselDirective
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ItemCarouselDirective(notify, relationsService) {
return {
scope: {
allowAudio: '<',
allowPicture: '<',
Function link
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope: IScope, elem) {
getLabelNameResolver().then((getLabelForFieldId) => {
scope.handleUrlsChange = function(fieldId, value) {
if (!scope.item.extra) {
scope.item.extra = {};
File MonitoringGroup.ts
has 575 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable complexity */
import _, {debounce} from 'lodash';
import getCustomSortForGroup, {GroupSortOptions} from '../helpers/CustomSortOfGroups';
import {GET_LABEL_MAP, getLabelForStage} from '../../workspace/content/constants';
import {isPublished} from 'apps/archive/utils';
Function render
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<WithSizeObserver style={{display: 'flex', margin: -4}}>
{({width, height}) => (
<VirtualListFromQuery
File IngestSourcesContent.ts
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _, {throttle} from 'lodash';
import {cloneDeep} from 'lodash';
import {gettext} from 'core/utils';
import {appConfig} from 'appConfig';
import {IBaseRestApiResponse} from 'superdesk-api';
Function UserPreferencesDirective
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function UserPreferencesDirective(
session, preferencesService, notify, asset, metadata, desks, modal,
$timeout, $q, userList, _, search, authThemes,
) {
// human readable labels for server values
Function link
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, elem) {
var PREFERENCES_KEY = 'agg:view';
var defaultMaxItems = 10;
scope.showGlobalSavedSearches = false;
Function render
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const padding = 20;
const extraButtons = this.props.getExtraButtons?.() ?? null;
const query: ISuperdeskQuery = getQueryWithFilters(
Similar blocks of code found in 3 locations. Consider refactoring. Open
<div className="proofreading-panel-content__block">
<label className="proofreading-panel-content__label">
{gettext('Headline')}
</label>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 225.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
<div className="image-block__metadata image-block__metadata--side-marg0">
<span>
<em>{gettext('Credit:')}{' '}</em>
{data.byline || gettext('[No Value]')}
</span>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 225.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
<div className="image-block__metadata image-block__metadata--side-marg0">
<span>
<em>{gettext('Credit:')}{' '}</em>
{data.byline || gettext('[No Value]')}
</span>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 225.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
<div className="proofreading-panel-content__block">
<label className="proofreading-panel-content__label">
{gettext('Body')}
</label>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 225.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76