GolangCI offers a SaaS platform to run linters. This issue aims to discuss the advantages and drawback of using such SaaS instead of running ourselves the test in Travis.
Note: this issue only focuses on linting tests, it is not related to any other test run in Travis.
Features:
I think that moving from Travis towards golangci.com may be a good idea as it will add some useful features while not loosing anything:
Same behavior:
.golangci.yaml file to configure which linters should be enabled (#1365). This file can be extended in golangci.com to configure how the test is run, which would be equivalent to modifying scripts/verify.sh.Additional features:
@droot @DirectXMan12 @mengqiy @camilamacedo86 @alexeldeib
Isn鈥檛 macOS and Windows support the real reason for Travis? If anything, I鈥檇 hope we can reduce our matrix (e.g if prow magically supported all three).
Maybe it鈥檚 worth doing something weird like configuring tide/all the merge goodies but using Travis for all of the actual tests? I wonder if we can link prow to Travis test results?
I heard some tell of changes to how the check system works, maybe we can get github to automate more of this for us somehow?
@alexeldeib
Isn鈥檛 macOS and Windows support the real reason for Travis? If anything, I鈥檇 hope we can reduce our matrix (e.g if prow magically supported all three).
This is just about the linting part. Linting is OS-agnostic.
Hi @Adirio,
IMO the lint check needs to be done in order to allow or NOT the merge of any PR. ( this is only my concern and I am happy with any change that still ensuring it )
WHY?
According to @mengqiy and @DirectXMan12, they have good reasons to do it in Prow and then, I am cool with that too 馃憤 .
Over this topic
The main advantage will be that a bot will comment on the linting issues without reviewers having to check them

IHMO: It shows cool 馃憤 and I am OK with. +1 to give a try at least.
IMPORTANT The lint checks should NOT/ can NOT be used to ensure if the project works in the SO X or Y ( Mac or Linux ). It is not its purpose and has no relation with.
c/c @alexeldeib
I tried to set it up in my own repository. It was really trivial.
Connect button in the repository list.Required.Settings tab.Branches menu option.Add rule button.Branch name pattern to either * or master.Require status checks to pass before merging.Require branches to be up to date before merging.GolangCI.Some images that may help
https://golangci.com/repos/github:

Mark tests as required:

Result: Adirio/kubebuilder#2

I know it鈥檚 about the linting, but we are increasing our tooling matrix for little reason imo. I really like the free golangci lint service, so maybe I鈥檓 just nitpicking, but it feels like it鈥檚 not really that much better than running the CLI in one of our two existing options.
I know it鈥檚 about the linting, but we are increasing our tooling matrix for little reason imo. I really like the free golangci lint service, so maybe I鈥檓 just nitpicking, but it feels like it鈥檚 not really that much better than running the CLI in one of our two existing options.
I thought the same way at the start, but we are already going to be using .golangci.yaml as the configuration once #1365 gets merged so basically golanci.com service will mean we remove one script but we don't have to configure anything else, and we win the added benefit of the bot that helps reviewing process.
The golangci bot looks really cool.
I don't have much concern as long as it meets the following:
- fast to start and fast to run
The test I did in https://github.com/Adirio/kubebuilder/pull/2 was instantly started and fast to run. Anyway, it will be much faster than any other test we are running so it will never be the bottleneck.
- stable
The software layer will probably be more stable than any we can use as it will be updater more often. The SaaS layer stability is hard to measure without trying.
- enough visibility for contributors
The report is exactly the same, it will actually be more accessible as the GitHub link will directly link to it instead of having to do to Travis and then go to the linting instance. And the bot wil greatly increase the visibility.
- friendly enough to trigger re-run (at least should not worse than travis)
Pushes trigger re-runs. Closing and opening will also retrigger, but this should not be needed as linting results will be the same if code doesn't change.
It seems like this golangci requires the bot account to have admin privileges on the repository. Is this not a concern?
EDIT: I've played around a little bit and it seems like admin priviledges are only required to "connect" your repository. This will setup the webhooks. After the webhooks are setup you can downgrade to "write" permissions.
Write permissions should be perfectly fine. I mean, it needs to write the code suggestions and report so write is needed.
Hi @Adirio,
Besides it is a good idea, not that:

See: https://medium.com/golangci/golangci-com-is-closing-d1fc1bd30e0e
So, I understand that we can close this one since it will no longer be possible.
Yeah, I just received an email from them :( Sad to hear it.
Write permissions should be perfectly fine. I mean, it needs to write the code suggestions and report so write is needed.
90% certain you don't need write permission for this. So if anyone is ambitious, they can still write a simple bot for this (instead of using golangci), kubebuilder would just have to add a webhook :)