viddo/atom-textual-velocity

View on GitHub

Showing 49 of 211 total issues

Avoid too many return statements within this function.
Open

      return "icon icon-file-pdf";
Severity: Major
Found in lib/columns/FileIconColumn.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return { index, filename: nextSifterResult.items[index].id };
    Severity: Major
    Found in lib/reducers/selectedNoteReducer.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return "icon icon-file-text";
      Severity: Major
      Found in lib/columns/FileIconColumn.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return "icon icon-file-binary";
        Severity: Major
        Found in lib/columns/FileIconColumn.js - About 30 mins to fix

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

            save(notes: Notes) {
              const cachePath = path.join(this._dir, CACHE_FILENAME);
          
              if (this._skipSave) {
                try {
          Severity: Minor
          Found in lib/NotesCache.js - About 25 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

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

          const findFirstRow = (content: string, searchRegexp?: RegExp) => {
            if (searchRegexp) {
              const searchMatch = content.match(searchRegexp);
              if (searchMatch) {
                // $FlowFixMe str.match returns an array according to flow core definitions (v0.78)
          Severity: Minor
          Found in lib/previewEditor.js - About 25 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

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

            componentDidMount() {
              this._disposables = new Disposables();
              this._focusInputSubject = new Subject();
          
              this._focusInputSubscription = this._focusInputSubject
          Severity: Minor
          Found in lib/react/presentationals/Search.js - About 25 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

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

          export default function setSortConfigs(
            sortField: string,
            lastSort?: SortSearchOptions
          ) {
            if (!lastSort) {
          Severity: Minor
          Found in lib/side-effects/setSortConfigs.js - About 25 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

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

            componentDidMount() {
              this._resizeSubscription = fromEvent(window, "resize")
                .pipe(debounceTime(50))
                .subscribe(() => {
                  if (this._node) {
          Severity: Minor
          Found in lib/react/presentationals/Panel.js - About 25 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