viddo/atom-textual-velocity

View on GitHub

Showing 211 of 211 total issues

Function _renderInline has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _renderInline() {
    switch (this.props.loading.status) {
      case "readDir":
        return (
          <div className="block">
Severity: Minor
Found in lib/react/presentationals/Loading.js - About 1 hr to fix

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

        bindNodeCallback<U>(
          callbackFunc: (callback: (err: any, result: U) => any) => any,
          selector?: void,
          scheduler?: rxjs$SchedulerClass
        ): () => rxjs$Observable<U>;
    Severity: Major
    Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
    flow-typed/npm/rxjs_v6.x.x.js on lines 1640..1644

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        bindNodeCallback<U>(
          callbackFunc: (callback: (err: any, result: U) => any) => any,
          selector?: void,
          scheduler?: rxjs$SchedulerClass
        ): () => rxjs$Observable<U>;
    Severity: Major
    Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
    flow-typed/npm/rxjs_v6.x.x.js on lines 254..258

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export default function rootReducer(state: State | void, action: Action) {
      if (!state) state = ({}: any); // just to be compliant with createStore
      const fileReadFails = fileReadFailsReducer(state.fileReadFails, action);
      const notes = notesReducer(state.notes, action);
      const sifterResult = sifterResultReducer(state.sifterResult, action, notes);
    Severity: Minor
    Found in lib/reducers/index.js - About 1 hr to fix

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

          zip<+T, A>(a: rxjs$Observable<A>, _: void): rxjs$Observable<T> => rxjs$Observable<[T, A]>;
      Severity: Major
      Found in flow-typed/npm/rxjs_v6.x.x.js and 2 other locations - About 1 hr to fix
      flow-typed/npm/rxjs_v6.x.x.js on lines 1310..1310
      flow-typed/npm/rxjs_v6.x.x.js on lines 1543..1543

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      function excludeNote(state, excludeFilename) {
        return Object.keys(state).reduce((nextNotes, filename) => {
          if (filename !== excludeFilename) {
            nextNotes[filename] = state[filename];
          }
      Severity: Major
      Found in lib/reducers/notesReducer.js and 1 other location - About 1 hr to fix
      lib/reducers/fileReadFailsReducer.js on lines 37..44

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          combineLatest<+T, A>(a: rxjs$Observable<A>, _: void): rxjs$Observable<T> => rxjs$Observable<[T, A]>;
      Severity: Major
      Found in flow-typed/npm/rxjs_v6.x.x.js and 2 other locations - About 1 hr to fix
      flow-typed/npm/rxjs_v6.x.x.js on lines 1419..1419
      flow-typed/npm/rxjs_v6.x.x.js on lines 1543..1543

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          withLatestFrom<+T, A>(a: rxjs$Observable<A>, _: void): rxjs$Observable<T> => rxjs$Observable<[T, A]>;
      Severity: Major
      Found in flow-typed/npm/rxjs_v6.x.x.js and 2 other locations - About 1 hr to fix
      flow-typed/npm/rxjs_v6.x.x.js on lines 1310..1310
      flow-typed/npm/rxjs_v6.x.x.js on lines 1419..1419

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

              } else {
                return Object.keys(state).reduce((memo, key) => {
                  if (key !== filename) {
                    memo[key] = state[key];
                  }
      Severity: Major
      Found in lib/reducers/fileReadFailsReducer.js and 1 other location - About 1 hr to fix
      lib/reducers/notesReducer.js on lines 99..106

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

        render() {
          if (this.props.loading.status !== "done") {
            return (
              <Loading
                loading={this.props.loading}
      Severity: Minor
      Found in lib/react/containers/App.js - About 1 hr to fix

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

        function readFilesAsObservable(
          fileReadersArray: IFileReader[],
          rawFile: RawFile,
          dir: string
        ) {
        Severity: Minor
        Found in lib/epics/fileReadsEpic.js - About 1 hr to fix

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

            declare export function connect<Com: ComponentType<*>,
              A,
              S: Object,
              DP: Object,
              SP: Object,
          Severity: Major
          Found in flow-typed/npm/react-redux_v5.x.x.js and 1 other location - About 1 hr to fix
          flow-typed/npm/react-redux_v5.x.x.js on lines 237..253

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

            declare export function connect<Com: ComponentType<*>,
              A,
              S: Object,
              DP: Object,
              SP: Object,
          Severity: Major
          Found in flow-typed/npm/react-redux_v5.x.x.js and 1 other location - About 1 hr to fix
          flow-typed/npm/react-redux_v5.x.x.js on lines 220..235

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

              zip<A, B>(
                a: rxjs$Observable<A>,
                b: rxjs$Observable<B>,
                _: void
              ): rxjs$Observable<[A, B]>;
          Severity: Major
          Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
          flow-typed/npm/rxjs_v6.x.x.js on lines 516..520

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

              forkJoin<A, B>(
                a: rxjs$Observable<A>,
                b: rxjs$Observable<B>,
                _: void
              ): rxjs$Observable<[A, B]>;
          Severity: Major
          Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
          flow-typed/npm/rxjs_v6.x.x.js on lines 791..795

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function previewEditor has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

          const previewEditor = (): PreviewEditor => {
            const editor: PreviewEditor = (atom.workspace.buildTextEditor({
              // autoHeight is necessay for scrolling to work as expected.
              // It's also done internally when opening a new text editor:
              // https://github.com/atom/atom/blob/3e97867f3e3ffd1b04a3b25978a40eb1d377f52f/src/workspace.js#L1266
          Severity: Minor
          Found in lib/previewEditor.js - About 1 hr 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

          Function newEventPatternHandlers has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function newEventPatternHandlers(dir: string) {
            let watcher;
            let onWatcherDidError;
          
            const addHandler = handler => {
          Severity: Minor
          Found in lib/epics/pathWatcherEpic.js - About 1 hr to fix

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

              render() {
                return (
                  <div
                    ref={this._list}
                    onScroll={this._onScroll.bind(this)}
            Severity: Minor
            Found in lib/react/presentationals/ScrollableList.js - About 1 hr to fix

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

                  windowWhen<+T>(
                    closingSelector: () => rxjs$Observable<any>
                  ): rxjs$Observable<T> => rxjs$Observable<rxjs$Observable<T>>;
              Severity: Major
              Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
              flow-typed/npm/rxjs_v6.x.x.js on lines 895..897

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

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

                  takeWhile<+T>(
                    predicate: (value: T, index: number) => boolean
                  ): rxjs$Observable<T> => rxjs$Observable<T>;
              Severity: Major
              Found in flow-typed/npm/rxjs_v6.x.x.js and 1 other location - About 1 hr to fix
              flow-typed/npm/rxjs_v6.x.x.js on lines 1166..1168

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language