Showing 30 of 75 total issues
File eslint-plugin-flowtype_vx.x.x.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// flow-typed signature: 8a1d5147a0d7527cc6f338a678839eb4
// flow-typed version: <<STUB>>/eslint-plugin-flowtype_v^2.30.0/flow_v0.38.0
/**
* This is an autogenerated libdef stub for:
Function default
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function (state = initialResultsState, action) {
const newState = Object.assign({}, state);
switch (action.type) {
Function mapDispatchToProps
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mapDispatchToProps(dispatch) {
return {
deleteJob: (jobID) => {
dialog.showMessageBox({
type: 'question',
Function pollJobStatus
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pollJobStatus() {
store.dispatch(setIsSubmitting(true));
store.dispatch(setIsRetrieving(true));
this.connect()
.then(() => this.setEncoding('ascii'))
Function mapDispatchToProps
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mapDispatchToProps(dispatch) {
return {
testIndicators: (evt) => {
evt.preventDefault();
dispatch(testIndicators);
Function disconnect
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async disconnect() {
this.connectionStatus = this.ftp.getConnectionStatus();
console.log("Attempting to disconnect");
this.ftp.end()
.then((msg) => console.log(msg))
Function retrieveMember
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
retrieveMember(datasetName, memberName) {
store.dispatch(setIsSubmitting(true));
store.dispatch(setIsRetrieving(true));
console.log(`Retrieving member ${memberName} from dataset ${datasetName}`);
return this.connect()
Function _pollMostRecentJobUntilComplete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _pollMostRecentJobUntilComplete(maxRetries, timeToWait) {
console.log("Attempting to get most recent job");
let mostRecentJob;
while (!mostRecentJob || mostRecentJob.status !== 'OUTPUT' && maxRetries > 0) {
console.log("TriesRemaining: ", maxRetries);
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<View
width="100%"
height="100%"
Function ConfigForm
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
function ConfigForm(props) {
const hostName = props.hostName;
const ftpPort = props.ftpPort;
const ftpUserName = props.ftpUserName;
const ftpPassword = props.ftpPassword;
- 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"