goreportcard icon indicating copy to clipboard operation
goreportcard copied to clipboard

cli alters generated files

Open wood-jp opened this issue 2 years ago • 2 comments

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.

wood-jp avatar Sep 13 '22 15:09 wood-jp

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.

geertjanvdk avatar Feb 24 '23 18:02 geertjanvdk

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

thediveo avatar Mar 30 '24 16:03 thediveo