keploy / keploy

Test generation for Developers. Generate tests and stubs for your application that actually work!
https://keploy.io
Apache License 2.0
3.4k stars 375 forks source link

feature: added golint in pipeline #1223

Closed officialasishkumar closed 3 months ago

officialasishkumar commented 5 months ago

Related Issue

feature: add golint in pipeline

Closes: #1216

Describe the changes you've made

Type of change

Feature

Please let us know if any test cases are added

Please describe the tests(if any). Provide instructions how its affecting the coverage.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Checklist:

Screenshots (if any)

Original Updated
original screenshot updated screenshot
sweep-ai[bot] commented 5 months ago

Apply Sweep Rules to your PR?

officialasishkumar commented 5 months ago

@shivamsouravjha PTAL

shivamsouravjha commented 5 months ago

seems to have some error as it doesn't run on this PR

officialasishkumar commented 5 months ago

@shivamsouravjha, image It only checks the files that have changed in the PR. Since I never made any changes in the codebase apart from adding the Pipeline, so it doesn't run on the whole codebase.

shivamsouravjha commented 5 months ago

to be clear the expectation is that once a PR is raise this should check for the code changes in the PR and be able to detect any changes that has lint issues

officialasishkumar commented 5 months ago

@shivamsouravjha, Just for demo I ran the linter on the whole codebase. As you can see now the test is failing. Here is the log

shivamsouravjha commented 5 months ago

Will it possible to not involve in previous errors ? as because of it folks won't be able to merge any PR.

officialasishkumar commented 5 months ago

Will it possible to not involve in previous errors ? as because of it folks won't be able to merge any PR.

@shivamsouravjha Yeah, it's possible. We can do that by this line

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
officialasishkumar commented 4 months ago

@shivamsouravjha PTAL

shivamsouravjha commented 4 months ago

Tried running this in pipeline got this errorf https://github.com/keploy/samples-go/actions/runs/7538153673/job/20518222700?pr=91

officialasishkumar commented 4 months ago

@shivamsouravjha, Thanks for the reply.

The error only occurs for samples-go because of this reason. I think there will be no errors if the pipeline is ran in Keploy repo.

I've opened a PR for modified version of the golint pipeline for samples-go which is in draft. I will let you know once it is working fine.

shivamsouravjha commented 4 months ago

@officialasishkumar I've added @PranshuSrivastava as reviewer as well.

PranshuSrivastava commented 3 months ago

@shivamsouravjha PTAL

slayerjain commented 3 months ago

I think its good start