gopatch icon indicating copy to clipboard operation
gopatch copied to clipboard

Refactoring and code transformation tool for Go.

Results 33 gopatch issues
Sort by recently updated
recently updated
newest added

Currently, patches with elisions only replace the first instance of the matched contents. For example, ```diff f(..., - "GET", + constants.Get, ..., ) ``` This will only replace the first...

enhancement

Elision correlation between the `-` and `+` sections of a patch is very naive right now. It matches based on positions of the ellipses in the patch, so it can...

enhancement

The machinery for parsing patches is currently convoluted, with multiple temporary files created inside token.FileSets so that when failures do occur, we have no obvious correlation to positions in the...

bug

gopatch is completely quiet right now. We should add flags for verbosity. Initial ideas: - `-v` flag for verbose mode where we'll list whether we changed files or not -...

enhancement
good first issue

We should support elision in value declarations. e.g., ```diff -var a, ..., c string +var a, ..., c int ``` ```diff var ( ... - name = value + _name...

enhancement

gopatch requires exactly one entity after the package name (if any) and imports. Patches that affect only imports are not supported. This fails: ```diff @@ @@ -import "example.com/foo-go" +import "example.com/foo"...

enhancement

Diffs in a patch can currently transform only one entity at a time. That is, ```diff @@ @@ type Foo struct { - bar string } @@ @@ type Bar...

enhancement

This diff adds the flag `--skip-generated` or short-form `-g` to be able to skip running gopatch on files containing generated code. When the flag is set to true, if the...

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. Release notes Sourced from codecov/codecov-action's releases. v4.0.0 v4 of the Codecov Action uses the CLI as the underlying upload. The CLI has helped to...

dependencies
github_actions

I have some files that import the same library package multiple times with different names: ``` import log "github.com/sirupsen/logrus" import "github.com/sirupsen/logrus" ``` I was hoping to write a gopatch to...

enhancement