CS-Tao/GTD-Visualization

View on GitHub

Showing 138 of 138 total issues

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

pack(rendererConfig).then(result => {
results += result + '\n\n'
m.success('renderer')
}).catch(err => {
m.error('renderer')
Severity: Major
Found in .electron-vue/build.js and 1 other location - About 4 hrs to fix
.electron-vue/build.js on lines 52..60

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

if (process.env.NODE_ENV === 'production') {
rendererConfig.devtool = ''
 
rendererConfig.plugins.push(
new BabiliWebpackPlugin(),
Severity: Major
Found in .electron-vue/webpack.renderer.config.js and 1 other location - About 3 hrs to fix
.electron-vue/webpack.web.config.js on lines 136..155

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

if (process.env.NODE_ENV === 'production') {
webConfig.devtool = ''
 
webConfig.plugins.push(
new BabiliWebpackPlugin(),
Severity: Major
Found in .electron-vue/webpack.web.config.js and 1 other location - About 3 hrs to fix
.electron-vue/webpack.renderer.config.js on lines 196..215

File index.js has 311 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
* Created by jiachenpan on 16/11/18.
*/
 
export function parseTime (time, cFormat) {
Severity: Minor
Found in src/renderer/utils/index.js - About 3 hrs to fix

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

    }, {
    text: '最近一个月',
    onClick (picker) {
    const end = new Date(new Date().toDateString())
    const start = new Date()
    Severity: Major
    Found in src/renderer/utils/index.js and 2 other locations - About 3 hrs to fix
    src/renderer/utils/index.js on lines 266..274
    src/renderer/utils/index.js on lines 282..290

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

    }, {
    text: '最近一周',
    onClick (picker) {
    const end = new Date(new Date().toDateString())
    const start = new Date()
    Severity: Major
    Found in src/renderer/utils/index.js and 2 other locations - About 3 hrs to fix
    src/renderer/utils/index.js on lines 274..282
    src/renderer/utils/index.js on lines 282..290

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

    }, {
    text: '最近三个月',
    onClick (picker) {
    const end = new Date(new Date().toDateString())
    const start = new Date()
    Severity: Major
    Found in src/renderer/utils/index.js and 2 other locations - About 3 hrs to fix
    src/renderer/utils/index.js on lines 266..274
    src/renderer/utils/index.js on lines 274..282

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

    export function getDateByDaysInYear (daysInYear, year) {
    var month = 0
    var day = 0
    const FEB = isLeapYear(year) ? 29 : 28
    const monthArray = [
    Severity: Major
    Found in src/renderer/utils/index.js - About 2 hrs to fix

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

      if (process.env.NODE_ENV !== 'production') {
      mainConfig.plugins.push(
      new webpack.DefinePlugin({
      '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
      })
      Severity: Major
      Found in .electron-vue/webpack.main.config.js and 1 other location - About 2 hrs to fix
      .electron-vue/webpack.renderer.config.js on lines 185..191

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

      if (process.env.NODE_ENV !== 'production') {
      rendererConfig.plugins.push(
      new webpack.DefinePlugin({
      '__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
      })
      Severity: Major
      Found in .electron-vue/webpack.renderer.config.js and 1 other location - About 2 hrs to fix
      .electron-vue/webpack.main.config.js on lines 52..58

      Function deepClone has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      export function deepClone (source) {
      if (!source && typeof source !== 'object') {
      throw new Error('error arguments', 'shallowClone')
      }
      const targetObj = source.constructor === Array ? [] : {}
      Severity: Minor
      Found in src/renderer/utils/index.js - About 1 hr to fix

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

      {
      path: '',
      component: Layout,
      children: [
      {
      Severity: Major
      Found in src/renderer/router/index.js and 4 other locations - About 1 hr to fix
      src/renderer/router/index.js on lines 30..41
      src/renderer/router/index.js on lines 54..65
      src/renderer/router/index.js on lines 66..77
      src/renderer/router/index.js on lines 78..89

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

      {
      path: '',
      component: Layout,
      children: [
      {
      Severity: Major
      Found in src/renderer/router/index.js and 4 other locations - About 1 hr to fix
      src/renderer/router/index.js on lines 30..41
      src/renderer/router/index.js on lines 42..53
      src/renderer/router/index.js on lines 54..65
      src/renderer/router/index.js on lines 66..77

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

      {
      path: '',
      component: Layout,
      children: [
      {
      Severity: Major
      Found in src/renderer/router/index.js and 4 other locations - About 1 hr to fix
      src/renderer/router/index.js on lines 42..53
      src/renderer/router/index.js on lines 54..65
      src/renderer/router/index.js on lines 66..77
      src/renderer/router/index.js on lines 78..89

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

      {
      path: '',
      component: Layout,
      children: [
      {
      Severity: Major
      Found in src/renderer/router/index.js and 4 other locations - About 1 hr to fix
      src/renderer/router/index.js on lines 30..41
      src/renderer/router/index.js on lines 42..53
      src/renderer/router/index.js on lines 54..65
      src/renderer/router/index.js on lines 78..89

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

      {
      path: '',
      component: Layout,
      children: [
      {
      Severity: Major
      Found in src/renderer/router/index.js and 4 other locations - About 1 hr to fix
      src/renderer/router/index.js on lines 30..41
      src/renderer/router/index.js on lines 42..53
      src/renderer/router/index.js on lines 66..77
      src/renderer/router/index.js on lines 78..89

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

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

        Function getDateByDaysInYear has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        export function getDateByDaysInYear (daysInYear, year) {
        var month = 0
        var day = 0
        const FEB = isLeapYear(year) ? 29 : 28
        const monthArray = [
        Severity: Minor
        Found in src/renderer/utils/index.js - About 1 hr to fix

        Function parseTime has a Cognitive Complexity of 12 (exceeds 5 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

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

        function build () {
        greeting()
         
        del.sync(['dist/electron/*', '!.gitkeep'])
         
         
        Severity: Minor
        Found in .electron-vue/build.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language