johnjones4/InBrief

View on GitHub

Showing 41 of 41 total issues

Function services has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const services = (state = initialServicesState, action) => {
  switch (action.type) {
    case ACTIONS.SET_SERVICES:
      const newServices = action.services.slice(0)
      newServices.forEach((service) => {
Severity: Major
Found in src/ui/util/reducer.js - About 3 hrs to fix

    Function exports has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = (mainWindow, manager) => {
      const sendServices = () => {
        console.log('Sending services list')
        mainWindow.webContents.send('services', manager.services.map((service) => {
          return {
    Severity: Major
    Found in src/lib/processHelpers/servicesSetup.js - About 2 hrs to fix

      Function NTLMXHRAPI has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const NTLMXHRAPI = (function () {
        function ntlmXHRApi (user, password) {
          this.userName = user
          this.password = password
        }
      Severity: Major
      Found in src/lib/util/EWSFactory.js - About 2 hrs to fix

        Function fetchAsana has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          fetchAsana ({now, tonight, friday}, api) {
            if (api.token || api.refreshToken) {
              let client
              return (() => {
                if (api.refreshToken) {
        Severity: Major
        Found in src/lib/services/Tasks.js - About 2 hrs to fix

          Function exports has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = (mainWindow) => {
            const authWindowOptions = {
              alwaysOnTop: true,
              autoHideMenuBar: true,
              webPreferences: {
          Severity: Major
          Found in src/lib/processHelpers/authorizorsSetup.js - About 2 hrs to fix

            Function fetchTodoist has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              fetchTodoist ({now, tonight, friday}, api) {
                if (api.token || api.refreshToken) {
                  const todoistRequest = (uri, params) => {
                    params.token = api.token
                    return request({
            Severity: Major
            Found in src/lib/services/Tasks.js - About 2 hrs to fix

              Widget has 21 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Widget extends Component {
                constructor (title, name, props) {
                  super(props)
                  this.name = name
                  this.state = {
              Severity: Minor
              Found in src/ui/widgets/Widget.js - About 2 hrs to fix

                Function renderEditor has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  renderEditor () {
                    const tempConfig = this.getWidgetTempConfig()
                    if (tempConfig) {
                      return (
                        <div>
                Severity: Major
                Found in src/ui/widgets/Twitter.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if (this.props.services.services && this.props.services.services.length > 0) {
                        const cols = 3
                        return (
                          <div>
                            <ResponsiveReactGridLayout
                  Severity: Critical
                  Found in src/ui/Dashboard.js - About 2 hrs to fix

                    Function buildMenu has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const buildMenu = (app, serviceManager) => {
                      const template = [
                        {
                          label: 'Application',
                          submenu: [
                    Severity: Minor
                    Found in src/lib/processHelpers/menuSetup.js - About 1 hr to fix

                      Function renderMailboxConfig has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        renderMailboxConfig (mailbox, i) {
                          switch (mailbox.type) {
                            case 'exchange':
                              return (
                                <div>
                      Severity: Minor
                      Found in src/ui/widgets/Email.js - About 1 hr to fix

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

                          render () {
                            if (this.props.services.services && this.props.services.services.length > 0) {
                              const cols = 3
                              return (
                                <div>
                        Severity: Minor
                        Found in src/ui/Dashboard.js - About 1 hr to fix

                          Function xhr has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            ntlmXHRApi.prototype.xhr = function (xhroptions) {
                              const _this = this
                              let userName = _this.userName
                              let domain = ''
                              if (userName.indexOf('\\') >= 0) {
                          Severity: Minor
                          Found in src/lib/util/EWSFactory.js - About 1 hr to fix

                            Function fetchImap has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              fetchImap (mailbox) {
                                const response = {
                                  'unread': 0,
                                  'flagged': 0
                                }
                            Severity: Minor
                            Found in src/lib/services/Email.js - About 1 hr to fix

                              Function renderEditor has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                renderEditor () {
                                  const tempConfig = this.getWidgetTempConfig()
                                  const mailboxTypes = [
                                    {
                                      name: 'exchange',
                              Severity: Minor
                              Found in src/ui/widgets/Email.js - About 1 hr to fix

                                Function renderEditor has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  renderEditor () {
                                    const tempConfig = this.getWidgetTempConfig()
                                    const apiTypes = [
                                      {
                                        name: 'asana',
                                Severity: Minor
                                Found in src/ui/widgets/Tasks.js - About 1 hr to fix

                                  Function renderEditor has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    renderEditor () {
                                      const tempConfig = this.getWidgetTempConfig()
                                      const calendarTypes = [
                                        {
                                          name: 'exchange',
                                  Severity: Minor
                                  Found in src/ui/widgets/Calendar.js - About 1 hr to fix

                                    Function exec has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      exec () {
                                        if (this.config.location) {
                                          const coords = zipcodes.lookup(this.config.location)
                                          if (coords) {
                                            return request({
                                    Severity: Minor
                                    Found in src/lib/services/Weather.js - About 1 hr to fix

                                      Function fetchSingleFeed has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        fetchSingleFeed (feed) {
                                          return new Promise((resolve, reject) => {
                                            const items = []
                                            const req = request({
                                              'uri': feed,
                                      Severity: Minor
                                      Found in src/lib/services/RSS.js - About 1 hr to fix

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

                                          exec () {
                                            if (this.config.credentials && this.config.credentials.access && this.config.credentials.access.token && this.config.credentials.access.tokenSecret) {
                                              this.client = new TwitterClient({
                                                'consumer_key': keys.twitter.key,
                                                'consumer_secret': keys.twitter.secret,
                                        Severity: Minor
                                        Found in src/lib/services/Twitter.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language