Oleg Kovalov

Results 89 issues of Oleg Kovalov

Name: `???` Before: ```go res := strings.Split(text, "-")[0] ``` After: ```go i := strings.Index(text, "-") res := text[:i] ``` There might be other patterns for other `strings` package functions.

checker request
ruleguard

Name: `utf8Names` Before: ```go ooɟ := "boom" // oh no :\ ``` After: ```go foo := "boom" ```

help wanted
good first issue
checker request
ruleguard

Name: `???` Before: ```go if foo, ok := bar.(*baz); ok { return fun() } return false ``` After: ```go foo, ok := bar.(*baz) return ok && fun() ``` From: https://github.com/go-critic/go-critic/pull/396#discussion_r201128256

ruleguard

Currently docs (`overview.md` file to be exact) isn't updated automatically in this repo https://github.com/go-critic/go-critic.github.io but it can be 😄 To generate new docs you need to run `make docs` from...

Makefile step should create simple checker with a given name and directory with the empty test files.

help wanted
good first issue
Hacktoberfest

before: ```go // code_test.go func testHelper(t *testing.T, params ...interface{}) interface{} { ... } ``` after: ```go // code_test.go func testHelper(t *testing.T, params ...interface{}) interface{} { t.Helper() ... } ``` This...

checker request

Name: `???` Before: ```bash /usr/home/go/src/pkg/testSuite.go ``` After: ```bash /usr/home/go/src/pkg/test_suite.go ```

help wanted
good first issue
checker request

Name: `uncheckedErr` Before: ```go a, err := foo() if err != nil { ... } b, err := bar() // err wasn't checked baz() ``` After: ```go a, err :=...

checker request

Name: `???` Before: ```go var re = regexp.MustCompile("^TODO") ``` After: ```go var f = func(s string) bool { strings.HasPrefix(s, "TODO") } ``` Dummy patterns: `^foo`, `foo$`, `.*foo.*`

checker request

Name: `???` Before: ```go func f() chan int { // ch is used only for write in foo, so outside there is only read from it ch := make(chan int,...

checker request