Re: [go-nuts] Re: [ANN] lint - Run linters as part of go test

2016-11-19 Thread sridhar
I've added support for gometalinter. Please take a look at the example in 
the godoc[1].

Thanks!
Sridhar

[1] https://godoc.org/github.com/surullabs/lint/gometalinter

On Tuesday, November 15, 2016 at 10:41:40 AM UTC+1, sri...@laddoo.net wrote:
>
> Thanks for the feedback!
>
> Using metalinter seems like a nice idea. I'll add it with all linters 
> disabled at first and let users choose the ones they want.
>
> I've create https://github.com/surullabs/lint/issues/2 to track this.
>
> On Tuesday, November 15, 2016 at 10:12:28 AM UTC+1, Steven Hartland wrote:
>>
>> Watch out, as some of those have broken vendor support.
>>
>> Here's notes we've made in the past (might be out of date)
>>
>>- Disable gotype, errcheck, dupl and structcheck as they are awful. 
>>- Disable interfacer and gas as they too picky. 
>>- Disable gofmt as its redundant and also sometimes gets false 
>>positives via metalinter. 
>>- Disable unconvert, aligncheck and varcheck which aren't vendor 
>>compatible. 
>>
>>
>> On 15/11/2016 06:39, Dobrosław Żybort wrote:
>>
>> Neat idea.
>> Just some random thought: instead of adding all linters by hand maybe you 
>> could use what gometalinter already provide?
>> https://github.com/alecthomas/gometalinter
>>
>> W dniu poniedziałek, 14 listopada 2016 14:27:26 UTC+1 użytkownik 
>> sri...@laddoo.net napisał: 
>>>
>>> Hi, 
>>>
>>> I'd like to announce a library I just released called lint [1]. It 
>>> allows you to run a variety of linters as part of go test. It also supports 
>>> whitelisting false positives. It reduces the need for build scripts, makes 
>>> CI integration easy and lets projects enforce linter usage without extra 
>>> scripts. I built it while working on our mobile app (which is written in 
>>> Go) and have found it useful so far.
>>>
>>> The below example test will check for gofmt usage, run go tool vet 
>>> --shadow, golint, errcheck, gosimple and gostaticcheck
>>>
>>> import ( 
>>> "testing"
>>> "github.com/surullabs/lint"
>>> ) 
>>>
>>>
>>> func TestLint(t *testing.T) { 
>>> if err := lint.Default.Check("./..."); err != nil {
>>> t.Fatal("lint failures: %v", err)
>>> }
>>> }
>>>
>>> Please let me know if you find this useful and if you'd like any 
>>> features added/removed/modified.
>>>
>>> Thanks!
>>> Sridhar
>>>
>>> [1] https://www.timeferret.com/lint
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: [ANN] lint - Run linters as part of go test

2016-11-15 Thread sridhar
Thanks for the feedback!

Using metalinter seems like a nice idea. I'll add it with all linters 
disabled at first and let users choose the ones they want.

I've create https://github.com/surullabs/lint/issues/2 to track this.

On Tuesday, November 15, 2016 at 10:12:28 AM UTC+1, Steven Hartland wrote:
>
> Watch out, as some of those have broken vendor support.
>
> Here's notes we've made in the past (might be out of date)
>
>- Disable gotype, errcheck, dupl and structcheck as they are awful. 
>- Disable interfacer and gas as they too picky. 
>- Disable gofmt as its redundant and also sometimes gets false 
>positives via metalinter. 
>- Disable unconvert, aligncheck and varcheck which aren't vendor 
>compatible. 
>
>
> On 15/11/2016 06:39, Dobrosław Żybort wrote:
>
> Neat idea.
> Just some random thought: instead of adding all linters by hand maybe you 
> could use what gometalinter already provide?
> https://github.com/alecthomas/gometalinter
>
> W dniu poniedziałek, 14 listopada 2016 14:27:26 UTC+1 użytkownik 
> sri...@laddoo.net napisał: 
>>
>> Hi, 
>>
>> I'd like to announce a library I just released called lint [1]. It allows 
>> you to run a variety of linters as part of go test. It also supports 
>> whitelisting false positives. It reduces the need for build scripts, makes 
>> CI integration easy and lets projects enforce linter usage without extra 
>> scripts. I built it while working on our mobile app (which is written in 
>> Go) and have found it useful so far.
>>
>> The below example test will check for gofmt usage, run go tool vet 
>> --shadow, golint, errcheck, gosimple and gostaticcheck
>>
>> import ( 
>> "testing"
>> "github.com/surullabs/lint"
>> ) 
>>
>>
>> func TestLint(t *testing.T) { 
>> if err := lint.Default.Check("./..."); err != nil {
>> t.Fatal("lint failures: %v", err)
>> }
>> }
>>
>> Please let me know if you find this useful and if you'd like any features 
>> added/removed/modified.
>>
>> Thanks!
>> Sridhar
>>
>> [1] https://www.timeferret.com/lint
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: [ANN] lint - Run linters as part of go test

2016-11-15 Thread Steven Hartland

Watch out, as some of those have broken vendor support.

Here's notes we've made in the past (might be out of date)

 * Disable gotype, errcheck, dupl and structcheck as they are awful.
 * Disable interfacer and gas as they too picky.
 * Disable gofmt as its redundant and also sometimes gets false
   positives via metalinter.
 * Disable unconvert, aligncheck and varcheck which aren't vendor
   compatible.


On 15/11/2016 06:39, Dobrosław Żybort wrote:

Neat idea.
Just some random thought: instead of adding all linters by hand maybe 
you could use what gometalinter already provide?

https://github.com/alecthomas/gometalinter

W dniu poniedziałek, 14 listopada 2016 14:27:26 UTC+1 użytkownik 
sri...@laddoo.net napisał:


Hi,

I'd like to announce a library I just released called lint [1]. It
allows you to run a variety of linters as part of go test. It also
supports whitelisting false positives. It reduces the need for
build scripts, makes CI integration easy and lets projects enforce
linter usage without extra scripts. I built it while working on
our mobile app (which is written in Go) and have found it useful
so far.

The below example test will check for gofmt usage, run go tool vet
--shadow, golint, errcheck, gosimple and gostaticcheck

import (
"testing"
"github.com/surullabs/lint "
)


func TestLint(t *testing.T) {
if err := lint.Default.Check("./..."); err != nil {
t.Fatal("lint failures: %v", err)
}
}

Please let me know if you find this useful and if you'd like any
features added/removed/modified.

Thanks!
Sridhar

[1] https://www.timeferret.com/lint 

--
You received this message because you are subscribed to the Google 
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to golang-nuts+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: [ANN] lint - Run linters as part of go test

2016-11-14 Thread Dobrosław Żybort
Neat idea.
Just some random thought: instead of adding all linters by hand maybe you 
could use what gometalinter already provide?
https://github.com/alecthomas/gometalinter

W dniu poniedziałek, 14 listopada 2016 14:27:26 UTC+1 użytkownik 
sri...@laddoo.net napisał:
>
> Hi,
>
> I'd like to announce a library I just released called lint [1]. It allows 
> you to run a variety of linters as part of go test. It also supports 
> whitelisting false positives. It reduces the need for build scripts, makes 
> CI integration easy and lets projects enforce linter usage without extra 
> scripts. I built it while working on our mobile app (which is written in 
> Go) and have found it useful so far.
>
> The below example test will check for gofmt usage, run go tool vet 
> --shadow, golint, errcheck, gosimple and gostaticcheck
>
> import (
> "testing"
> "github.com/surullabs/lint"
> ) 
>
>
> func TestLint(t *testing.T) {
> if err := lint.Default.Check("./..."); err != nil {
> t.Fatal("lint failures: %v", err)
> }
> }
>
> Please let me know if you find this useful and if you'd like any features 
> added/removed/modified.
>
> Thanks!
> Sridhar
>
> [1] https://www.timeferret.com/lint
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.