Showing 3,654 of 3,654 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
this.authenticateXMPP = (jid, transactionId) => urls.resource('auth_xmpp')
.then((url) => $http.post(url, {jid: jid, transactionId: transactionId}))
.then(this.setToken);
- 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 72.
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
interface IProps {
container: React.ComponentType<IEditorComponentContainerProps>;
config: IDropdownConfigRemoteSource;
value: IDropdownValue;
language: 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 72.
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.authenticate = (username, password) => urls.resource('auth_db')
.then((url) => $http.post(url, {username: username, password: password}))
.then(this.setToken);
- 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 72.
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
if (backward) {
newSelection = selection.merge({
anchorOffset: selection.getEndOffset(),
anchorKey: selection.getEndKey(),
focusOffset: selection.getEndOffset(),
- 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 72.
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
const str2 = (() => {
if (value2 == null) {
return '';
}
- 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 72.
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
const str1 = (() => {
if (value1 == null) {
return '';
}
- 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 72.
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 render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {gettext} = superdeskApi.localization;
return (
<React.Fragment>
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config) {
var webpackConfig = makeConfig(grunt);
// in karma, entry is read from files prop
webpackConfig.entry = null;
Function assetsReducer
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function assetsReducer(
state: IAssetState = initialState,
action: IAssetActionTypes,
): IAssetState {
switch (action.type) {
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {item} = this.props;
const {readOnly} = that.props;
const {removeItem} = that;
Function getEditor3Field
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getEditor3Field()
: ICustomFieldType<IEditor3ValueOperational, IEditor3ValueStorage, IEditor3Config, IUserPreferences> {
const field: ICustomFieldType<IEditor3ValueOperational, IEditor3ValueStorage, IEditor3Config, IUserPreferences> = {
id: EDITOR_3_FIELD_TYPE,
label: gettext('Editor3 (authoring-react)'),
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {item} = this.props;
const {readOnly} = that.props;
const {removeItem} = that;
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {label, helperText, editable, required} = this.props;
return (
<div>
Function SearchContainer
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function SearchContainer() {
const FILTERS_PANEL_PREFERENCES_KEY = 'search:filters_panel_open';
var filtersPanelPreferences = {
[FILTERS_PANEL_PREFERENCES_KEY]: {
'type': 'bool',
Function ItemSearchbar
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ItemSearchbar($location, $document, asset) {
return {
scope: true,
templateUrl: asset.templateUrl('apps/search/views/item-searchbar.html'),
link: function(scope, elem) {
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {items, markupV2} = this.props;
return (
<React.Fragment>
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
component,
field,
profileName,
Function getSpellchecker
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getSpellchecker(language: string): ISpellchecker {
const spellcheck = ng.get('spellcheck');
const spellcheckerName = ({
fr: 'grammalecte',
nl: 'leuven_dutch',
Function link
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element, attrs, controller) {
scope.$watch('list', (list) => {
if (!list) {
return false;
}
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {item, allItems, options} = this.props;
const checkbox = (
<SelectBoxWithoutMutation