CS-Tao/GTD-Visualization

View on GitHub

Showing 138 of 138 total issues

Function debounce has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

export function debounce (func, wait, immediate) {
let timeout, args, context, timestamp, result
 
const later = function () {
// 据上一次触发时间间隔
Severity: Minor
Found in src/renderer/utils/index.js - About 1 hr to fix

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

function startRenderer () {
return new Promise((resolve, reject) => {
rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)
 
const compiler = webpack(rendererConfig)
Severity: Minor
Found in .electron-vue/dev-runner.js - About 1 hr to fix

    Function parseTime has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function parseTime (time, cFormat) {
    if (arguments.length === 0) {
    return null
    }
    const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
    Severity: Minor
    Found in src/renderer/utils/index.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      delOthersViews ({ commit, state }, view) {
      return new Promise((resolve) => {
      commit('DEL_OTHERS_VIEWS', view)
      resolve([...state.visitedViews])
      })
      Severity: Major
      Found in src/renderer/store/modules/cachedViews.js and 1 other location - About 1 hr to fix
      src/renderer/store/modules/cachedViews.js on lines 57..62

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      delVisitedViews ({ commit, state }, view) {
      return new Promise((resolve) => {
      commit('DEL_VISITED_VIEWS', view)
      resolve([...state.visitedViews])
      })
      Severity: Major
      Found in src/renderer/store/modules/cachedViews.js and 1 other location - About 1 hr to fix
      src/renderer/store/modules/cachedViews.js on lines 63..68

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

      function startMain () {
      return new Promise((resolve, reject) => {
      mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main)
       
      const compiler = webpack(mainConfig)
      Severity: Minor
      Found in .electron-vue/dev-runner.js - About 1 hr to fix

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

        export default function openWindow (url, title, w, h) {
        // Fixes dual-screen position Most browsers Firefox
        const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left
        const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top
         
         
        Severity: Minor
        Found in src/renderer/utils/openWindow.js - About 55 mins to fix

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

        export function objectMerge (target, source) {
        /* Merges two objects,
        giving the last one precedence */
         
        if (typeof target !== 'object') {
        Severity: Minor
        Found in src/renderer/utils/index.js - About 55 mins to fix

        Function cssLoaders has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        exports.cssLoaders = function (options) {
        options = options || {}
         
        const cssLoader = {
        loader: 'css-loader',
        Severity: Minor
        Found in .electron-vue/utils.js - About 45 mins to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height
        Severity: Minor
        Found in src/renderer/utils/openWindow.js and 1 other location - About 35 mins to fix
        src/renderer/utils/openWindow.js on lines 14..14

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width
        Severity: Minor
        Found in src/renderer/utils/openWindow.js and 1 other location - About 35 mins to fix
        src/renderer/utils/openWindow.js on lines 15..15

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        use: {
        loader: 'url-loader',
        query: {
        Severity: Minor
        Found in .electron-vue/webpack.web.config.js and 1 other location - About 30 mins to fix
        .electron-vue/webpack.renderer.config.js on lines 111..121

        Avoid too many return statements within this function.
        Open

        return parseTime(time, option)
        Severity: Major
        Found in src/renderer/utils/index.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

          return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
          Severity: Major
          Found in src/renderer/utils/index.js - About 30 mins to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            {
            test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
            use: {
            loader: 'url-loader',
            query: {
            Severity: Minor
            Found in .electron-vue/webpack.renderer.config.js and 1 other location - About 30 mins to fix
            .electron-vue/webpack.web.config.js on lines 75..85

            Function DEL_OTHERS_VIEWS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            DEL_OTHERS_VIEWS: (state, view) => {
            for (const [i, v] of state.visitedViews.entries()) {
            if (v.path === view.path) {
            state.visitedViews = state.visitedViews.slice(i, i + 1)
            break
            Severity: Minor
            Found in src/renderer/store/modules/cachedViews.js - About 25 mins to fix

            Function formatTime has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            export function formatTime (time, option) {
            time = +time * 1000
            const d = new Date(time)
            const now = Date.now()
             
             
            Severity: Minor
            Found in src/renderer/utils/index.js - About 25 mins to fix

            Function DEL_VISITED_VIEWS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            DEL_VISITED_VIEWS: (state, view) => {
            for (const [i, v] of state.visitedViews.entries()) {
            if (v.path === view.path) {
            state.visitedViews.splice(i, 1)
            break
            Severity: Minor
            Found in src/renderer/store/modules/cachedViews.js - About 25 mins to fix
            Severity
            Category
            Status
            Source
            Language