Skip to content

Commit

Permalink
Merge pull request #19 from indeedeng/cnmcavoy/fix-gen-code
Browse files Browse the repository at this point in the history
don't output generated code to stdout unless you really are supposed to
  • Loading branch information
cnmcavoy committed Aug 7, 2020
2 parents 9217bfa + 9f7c2ee commit d288c64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.2] - 2020-08-06
### Fixed
- go-groups correctly detects generated code and ignores generated code by default

## [1.1.1] - 2020-08-06
### Added
- Added -g flag to instruct go-groups to analyze and include generated code
Expand Down
2 changes: 1 addition & 1 deletion gofmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func processFile(filename string, in io.Reader, out io.Writer, fixFmt, generated
}

if !generatedCode && isGeneratedCode(src) {
if !*list {
if !*list && !*write && !*doDiff {
_, err = out.Write(src)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
exitBadStdin = 2
exitInternalError = 3

versionStr = "go-groups version 1.1.1 (2020-08-06)"
versionStr = "go-groups version 1.1.2 (2020-08-06)"
)

var (
Expand Down

0 comments on commit d288c64

Please sign in to comment.