Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed May 19, 2024
1 parent 87a5db3 commit f7b1adc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions internal/lint/rst.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"os/exec"
"regexp"
"runtime"
"strings"

"github.com/errata-ai/vale/v3/internal/core"
Expand Down Expand Up @@ -60,17 +59,11 @@ func (l *Linter) lintRST(f *core.File) error {
return l.lintHTMLTokens(f, []byte(html), 0)
}

func callRst(text, lib, exe string) (string, error) {
func callRst(text, lib, _ string) (string, error) {
var out bytes.Buffer
var cmd *exec.Cmd

Check failure on line 64 in internal/lint/rst.go

View workflow job for this annotation

GitHub Actions / lint

S1021: should merge variable declaration with assignment on next line (gosimple)

if strings.HasPrefix(runtime.GOOS, "windows") {
// rst2html is executable by default on Windows.
cmd = exec.Command(exe, append([]string{lib}, rstArgs...)...) //nolint:gosec
} else {
cmd = exec.Command(lib, rstArgs...)
}

cmd = exec.Command(lib, rstArgs...)
cmd.Stdin = strings.NewReader(text)
cmd.Stdout = &out

Expand Down

0 comments on commit f7b1adc

Please sign in to comment.