mirror of
https://github.com/walles/moar.git
synced 2024-09-11 12:15:43 +03:00
Bump golangci-lint
This commit is contained in:
parent
fdb520ce13
commit
a7156c5ee7
@ -11,7 +11,7 @@ jobs:
|
|||||||
# to bump it, version number is at the end of the "curl | sh"
|
# to bump it, version number is at the end of the "curl | sh"
|
||||||
# commandline below:
|
# commandline below:
|
||||||
# https://github.com/golangci/golangci-lint/releases/latest
|
# https://github.com/golangci/golangci-lint/releases/latest
|
||||||
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.0
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0
|
||||||
|
|
||||||
- ./test.sh
|
- ./test.sh
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package m
|
package m
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
@ -126,7 +125,7 @@ func getSamplesDir() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getTestFiles() []string {
|
func getTestFiles() []string {
|
||||||
files, err := ioutil.ReadDir(getSamplesDir())
|
files, err := os.ReadDir(getSamplesDir())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -189,7 +188,7 @@ func testHighlightingLineCount(t *testing.T, filenameWithPath string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load the unformatted file
|
// Load the unformatted file
|
||||||
rawBytes, err := ioutil.ReadFile(filenameWithPath)
|
rawBytes, err := os.ReadFile(filenameWithPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -367,7 +366,7 @@ func BenchmarkReadLargeFile(b *testing.B) {
|
|||||||
|
|
||||||
// First, create it from something...
|
// First, create it from something...
|
||||||
input_filename := getSamplesDir() + "/../m/pager.go"
|
input_filename := getSamplesDir() + "/../m/pager.go"
|
||||||
contents, err := ioutil.ReadFile(input_filename)
|
contents, err := os.ReadFile(input_filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -412,7 +411,7 @@ func BenchmarkReadLargeFile(b *testing.B) {
|
|||||||
func BenchmarkCountLines(b *testing.B) {
|
func BenchmarkCountLines(b *testing.B) {
|
||||||
// First, get some sample lines...
|
// First, get some sample lines...
|
||||||
input_filename := getSamplesDir() + "/../m/pager.go"
|
input_filename := getSamplesDir() + "/../m/pager.go"
|
||||||
contents, err := ioutil.ReadFile(input_filename)
|
contents, err := os.ReadFile(input_filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user