Showing 3,654 of 3,654 total issues
Function MacrosService
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MacrosService(api, notify) {
/**
* Recursively returns all macros
*
* @return {*}
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {item, field, editable} = this.props;
const FieldType = getField(field.custom_field_type);
if (FieldType == null) {
Function AuthoringService
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
$q,
$location,
api,
lock,
autosave,
Function PlacesServiceFactory
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function PlacesServiceFactory(api, features, metadata) {
const geoNameToCity = (data: IGeoName): ILocated => ({
dateline: 'city',
country_code: data.country_code,
tz: data.tz,
Function MediaFieldsController
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function MediaFieldsController($q, metadata) {
function getCV(field) {
const cv = metadata.cvs.find((_cv) => _cv._id === field || _cv.schema_field === field);
if (cv == null && field === 'subject') {
Function saveAuthoring
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.save = function saveAuthoring(
origItem: IArticle,
_item: IArticle,
requestEditor3DirectivesToGenerateHtml?: Array<()=> void>,
) {
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {Wrapper, showPrintDialog, closeModal} = this.props;
return (
<Wrapper
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<>
<div className="sd-board__subheader">
<h5 className="sd-board__subheader-title">{this.props.role?.name ?? gettext('No role')}</h5>
Function getDateRangesByKey
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getDateRangesByKey(): Dictionary<string, IDateRange> {
const before_next_month: IDateRange = {
key: 'before_next_month',
label: gettext('Next Month'),
elasticSearchDateRange: {
Function MediaInfo
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const MediaInfo: React.StatelessComponent<IProps> = (props) => {
const datetime = ng.get('datetime');
const item = props.item;
const meta = [];
Function dragDrop
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function dragDrop(
dataTransfer: DataTransfer,
type: string,
blockKey: string | null,
_canAddArticleEmbed?: (srcId: string) => ReturnType<typeof canAddArticleEmbed>,
Function getLeftRangeAndTextForStyle
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getLeftRangeAndTextForStyle(editorState, style) {
const type = getHighlightTypeFromStyleName(style);
const selection = editorState.getSelection();
const content = editorState.getCurrentContent();
let startBlock = content.getBlockForKey(selection.getStartKey());
Function constructor
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props: ILiveQueryProps<T> & {onInitialized(): void}) {
super(props);
this.state = {};
Similar blocks of code found in 4 locations. Consider refactoring. Open
FileInput.propTypes = {
field: PropTypes.string,
label: PropTypes.string,
value: PropTypes.array,
onChange: PropTypes.func,
- 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 75.
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
Function constructor
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props: ILiveResourcesProps & {onInitialized(): void}) {
super(props);
this.state = {};
Similar blocks of code found in 4 locations. Consider refactoring. Open
ContactNumberInput.propTypes = {
remove: PropTypes.func,
field: PropTypes.string,
value: PropTypes.object,
label: PropTypes.string,
- 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 75.
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 4 locations. Consider refactoring. Open
Header.propTypes = {
text: PropTypes.string,
onClose: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
- 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 75.
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 4 locations. Consider refactoring. Open
Header.propTypes = {
text: PropTypes.string,
onClose: PropTypes.func,
children: PropTypes.node,
className: PropTypes.string,
- 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 75.
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
'item:marked': (notification: IMarkForUserNotification) => {
return {
body: notification.message,
actions: [
{
- 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 75.
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
this.eventListenersToRemoveBeforeUnmounting.push(
addWebsocketEventListener('resource:created', (event) => {
const {resource} = event.extra;
/**
- 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 75.
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