spmcbride1201/keypunch-electron

View on GitHub

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

// 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:
Severity: Minor
Found in flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js - About 2 hrs to fix

    Function default has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function (state = initialResultsState, action) {
    
      const newState = Object.assign({}, state);
    
      switch (action.type) {
    Severity: Minor
    Found in app/reducers/results.js - About 1 hr to fix

      Function mapDispatchToProps has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function mapDispatchToProps(dispatch) {
        return {
          deleteJob: (jobID) => {
            dialog.showMessageBox({
              type: 'question',
      Severity: Minor
      Found in app/components/Results.js - About 1 hr to fix

        Function pollJobStatus has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          pollJobStatus() {
            store.dispatch(setIsSubmitting(true));
            store.dispatch(setIsRetrieving(true));
            this.connect()
              .then(() => this.setEncoding('ascii'))
        Severity: Minor
        Found in app/utils/jesFtp.js - About 1 hr to fix

          Function mapDispatchToProps has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function mapDispatchToProps(dispatch) {
            return {
              testIndicators: (evt) => {
                evt.preventDefault();
                dispatch(testIndicators);
          Severity: Minor
          Found in app/components/StatusBar.js - About 1 hr to fix

            Function disconnect has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              async disconnect() {
                this.connectionStatus = this.ftp.getConnectionStatus();
                console.log("Attempting to disconnect");
                this.ftp.end()
                  .then((msg) => console.log(msg))
            Severity: Minor
            Found in app/utils/jesFtp.js - About 1 hr to fix

              Function retrieveMember has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                retrieveMember(datasetName, memberName) {
                  store.dispatch(setIsSubmitting(true));
                  store.dispatch(setIsRetrieving(true));
                  console.log(`Retrieving member ${memberName} from dataset ${datasetName}`);
                  return this.connect()
              Severity: Minor
              Found in app/utils/jesFtp.js - About 1 hr to fix

                Function _pollMostRecentJobUntilComplete has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                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);
                Severity: Minor
                Found in app/utils/jesFtp.js - About 1 hr to fix

                  Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      return (
                        <View
                          width="100%"
                          height="100%"
                  Severity: Minor
                  Found in app/components/Explorer.js - About 1 hr to fix

                    Function ConfigForm has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function ConfigForm(props) {
                      const hostName = props.hostName;
                      const ftpPort = props.ftpPort;
                      const ftpUserName = props.ftpUserName;
                      const ftpPassword = props.ftpPassword;
                    Severity: Minor
                    Found in app/components/ConfigForm.js - About 55 mins to fix

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language