Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Conversation

@dlespiau
Copy link
Contributor

We run gofmt with the simplify (-s) option. Some of the rewrite rules
are hidden behind that flag because they break previous go versions.
Editors don't run gofmt with -s by default for that reason and so it's
not unlikely the static checks scripts find something to change.

We can do better than displaying the list of "offending" files, we can
make gofmt display a unified diff with the suggested simplification.
It's just a matter of using the -d flag.

Signed-off-by: Damien Lespiau damien.lespiau@intel.com

We run gofmt with the simplify (-s) option. Some of the rewrite rules
are hidden behind that flag because they break previous go versions.
Editors don't run gofmt with -s by default for that reason and so it's
not unlikely the static checks scripts find something to change.

We can do better than displaying the list of "offending" files, we can
make gofmt display a unified diff with the suggested simplification.
It's just a matter of using the -d flag.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
@coveralls
Copy link

coveralls commented Mar 17, 2017

Coverage Status

Coverage increased (+0.3%) to 59.296% when pulling 7bb5e1b on dlespiau:20170317-gofmt-unified-diff into 976ddd9 on clearcontainers:master.

@jodh-intel
Copy link

Nice!

lgtm

@dlespiau dlespiau merged commit df16fe7 into clearcontainers:master Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants