gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
2.01k stars 249 forks source link

cli alters generated files #397

Open wood-jp opened 2 years ago

wood-jp commented 2 years ago

Repo contains generated code that helpfully starts with

// Code generated - DO NOT EDIT.

Running the cli renames these files to foo.go.grc.bk and then leaves them like this.

I would expect that the report card should not actually alter any files in anyway.

geertjanvdk commented 1 year ago

I believe that the idea is that goreportcard as a services clones the repository and does whatever it pleases with it. This is fine. However, goreportcard-cli suffers from this.

The workaround would be to clone temporary, and then run report on that. That's a pain, but valid workaround.

Greater would to actually rename the files back that were skipped. Maybe a fork of this project has already done this? I have clone the repository, maybe I can figure something out.

thediveo commented 8 months ago

Sorry, but goreportcard-cli can be run at any time on a working repo in order to find issues during development. So renaming generated code is just bad behavior; you can try to find some excuses for it, but it is simply still bad behavior. For your benefit, I'm adding here a screenshot of the README below; there is nothing to support the above hypothesis.

goreportcard README CLI