Showing 24 of 95 total issues
File geonode.jsx
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
global.React = React;
import ReactDOM from 'react-dom';
global.ReactDOM = ReactDOM;
import 'core-js/fn/object/assign';
Function updateMap
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
updateMap(props) {
if (props.config) {
var tileServices = [];
var errors = [];
var filteredErrors = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {formatMessage} = this.props.intl;
const actions = [
<FlatButton className='save-btn' primary={true} label={formatMessage(messages.savemapbutton)} onTouchTap={this._handleSave.bind(this)} />,
<FlatButton className='close-btn' label={formatMessage(messages.closebutton)} onTouchTap={this._handleClose.bind(this)} />
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
var error;
if (this.state.errors.length > 0) {
var msg = '';
for (var i = 0, ii = this.state.errors.length; i < ii; i++) {
Function selectorFactory
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function selectorFactory(dispatch) {
let result = {};
const resetMapId = () => {
dispatch(setMapId(undefined));
}
Function map
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const map = (state = defaultState, action) => {
switch(action.type) {
case GET_MAP_ID:
return state.id;
case SET_MAP_ID:
Function createThumbnail
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createThumbnail = (obj_id, map) => {
map.once('postcompose', function(evt) {
var canvas = evt.context.canvas;
canvas.toBlob(function(blob) {
var url = window.location.pathname.replace('/view', '');
Function render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
render() {
var error;
if (this.state.errors.length > 0) {
var msg = '';
for (var i = 0, ii = this.state.errors.length; i < ii; i++) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Don't use IDs in selectors. Open
Open
#debug {
- Exclude checks
Don't use IDs in selectors. Open
Open
#debug input {
- Exclude checks
Don't use IDs in selectors. Open
Open
#content, #main {
- Exclude checks
Don't use IDs in selectors. Open
Open
#save-button {
- Exclude checks
Don't use IDs in selectors. Open
Open
#map {
- Exclude checks
Don't use IDs in selectors. Open
Open
#globe-button {
- Exclude checks
Don't use IDs in selectors. Open
Open
#content, #main {
- Exclude checks
Don't use IDs in selectors. Open
Open
#rotate-button {
- Exclude checks
Don't use IDs in selectors. Open
Open
#zoom-buttons {
- Exclude checks
Use of !important Open
Open
max-height: 94vh !important;
- Exclude checks
Use of !important Open
Open
top: 20px !important;
- Exclude checks
Don't use IDs in selectors. Open
Open
#home-button {
- Exclude checks