Showing 3,654 of 3,654 total issues
Function getFieldV2
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
getFieldV2: (fieldEditor, fieldSchema) => {
const fieldConfig: IDropdownTreeConfig = {
getItems: () => {
const metadata = ng.get('metadata');
Function initTupleFields
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initTupleFields() {
$scope.fieldAliases = {};
$scope.fieldsNotSelected = {};
$scope.currentFeedingService = $scope.provider ? _.find($scope.feedingServices,
{feeding_service: $scope.provider.feeding_service}) : null;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<Modal
visible
zIndex={1050}
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {value, dataList, label, readOnly, querySearch, initValue} = this.props;
const listData = querySearch ? dataList : this.state.filteredDataList;
const inputValue = initValue ? value : this.state.searchText || value || '';
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
onClose,
target,
dataList,
Function searchTerms
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
scope.searchTerms = function(term) {
if (!term) {
scope.terms = filterSelected(scope.list);
scope.activeList = false;
} else {
Function link
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope) {
var _orig;
scope.task = null;
scope.task_details = null;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="sd-board" >
<div
className={'sd-board__header' + (this.props.onDeskSelect ? ' sd-board__header--clickable' : '')}
Function componentDidMount
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
this.fetchAndShowActiveMessages();
this.eventListenersToRemove.push(
addWebsocketEventListener(
Function SearchContainerController
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SearchContainerController($scope, $location, pageTitle, preferencesService) {
const query = omit($location.search(), '_id', 'repo');
this.flags = $scope.flags || {};
this.flags.facets = !isEmpty(query);
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {noBorder, noPadding, grow, justifyContent, ellipsisAndGrow, children, bold = false, title} = this.props;
const cssClasses = [];
var styles: CSSProperties = {};
Function onSubmit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit() {
const {body, type} = this.state;
const _hidePopups = this.props.hidePopups;
const {highlightId} = this.props.data;
Function handleBeforeInput
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleBeforeInput(chars: string, editorState: EditorState) {
this.setState({contentChangesAfterLastFocus: this.state.contentChangesAfterLastFocus + 1});
const author = getCurrentAuthor();
const {onChange, suggestingMode, onCreateAddSuggestion} = this.props;
Function setDeleteSuggestionForCharacter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
const setDeleteSuggestionForCharacter = (editorState, data) => {
const selection = editorState.getSelection();
const paragraphStyle = Highlights.getHighlightStyleAtOffset(editorState, paragraphSuggestionTypes, selection, -1);
Function processCells
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const processCells = (state, fn) => {
const {activeCell, editorState} = state;
if (activeCell === null) {
return state;
Function getNextPosition
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getNextPosition(originalElement, editorNode) {
const element = originalElement.cloneNode(true) as HTMLElement;
const mainFlexElement = element.firstElementChild as HTMLElement;
originalElement.insertAdjacentElement('beforebegin', element);
Function TimeoutInterceptor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function TimeoutInterceptor($timeout, $q, $rootScope, request) {
var TIMEOUT = 3000,
TIMEOUT_MAX = 60000,
STATUS = {
OK: 0,
Identical blocks of code found in 2 locations. Consider refactoring. Open
setParentNode(node) {
if (node && node.parentNode) {
this.dom.parent = node.parentNode;
} else {
this.dom.parent = null;
- 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 62.
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 5 locations. Consider refactoring. Open
constructor(props: IProps) {
super(props);
this.state = {
initialized: false,
- 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 62.
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
setParentNode(node) {
if (node && node.parentNode) {
this.dom.parent = node.parentNode;
} else {
this.dom.parent = null;
- 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 62.
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