elves/elvish

View on GitHub
pkg/cli/tk/codearea.go

Summary

Maintainability
A
1 hr
Test Coverage

Method codeArea.expandSmallWordAbbr has 6 return statements (exceeds 4 allowed).
Open

func (w *codeArea) expandSmallWordAbbr(trigger rune, categorizer func(rune) int) {
    buf := &w.State.Buffer
    if buf.Dot < len(buf.Content) {
        // Word abbreviations are only expanded when inserting at the end of the buffer.
        return
Severity: Major
Found in pkg/cli/tk/codearea.go - About 40 mins to fix

    Method codeArea.handleKeyEvent has 6 return statements (exceeds 4 allowed).
    Open

    func (w *codeArea) handleKeyEvent(key ui.Key) bool {
        isFuncKey := key.Mod != 0 || key.Rune < 0
        if w.pasting {
            if isFuncKey {
                // TODO: Notify the user of the error, or insert the original
    Severity: Major
    Found in pkg/cli/tk/codearea.go - About 40 mins to fix

      Function NewCodeArea has 5 return statements (exceeds 4 allowed).
      Open

      func NewCodeArea(spec CodeAreaSpec) CodeArea {
          if spec.Bindings == nil {
              spec.Bindings = DummyBindings{}
          }
          if spec.Highlighter == nil {
      Severity: Major
      Found in pkg/cli/tk/codearea.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status