Comments (10)
Yeah I think something like
GITDIR="$(pwd)"
cd "$(mktemp -d)"
git checkout --git-dir="$GITDIR"/.git
go fmt ./...
will work
from ci-helpers.
How about find . -name '*.go' -print0 | xargs -0 gofmt -l
so that we don't actually modify any files.
Is there some code go code we should avoid running the gofmt check on?
from ci-helpers.
In go-ipfs we run go fmt over all code but we might want to exclude /vendor/
for "reasons".
from ci-helpers.
How about find . -name '*.go' -print0 | xargs -0 gofmt -l so that we don't actually modify any files.
SGTM.
Is there some code go code we should avoid running the gofmt check on?
Not that I can think of. However, we may run into issues with gx-go rw
and gofmt. I'm not sure.
from ci-helpers.
Afaik, gx-go might format code, it runs the code through AST which when outputting formats it (I think).
from ci-helpers.
Hm. Do we need to run this pre-install?
from ci-helpers.
I don't like the idea of having to do this pre-install and not in the test script.
We could check out a clean copy in a tmpdir and run go fmt
there...
from ci-helpers.
I don't like the idea of having to do this pre-install and not in the test script.
I agree.
We could check out a clean copy in a tmpdir and run
Yuck but..., yes? I can't think of a better solution (it would also help us avoid any other contamination).
from ci-helpers.
SGTM.
from ci-helpers.
This is now done, but I had to use git clone -s
.
from ci-helpers.
Related Issues (9)
- Add GOVETFLAGS HOT 7
- travis ci script doesn't work with go modules HOT 9
- Test go modules and gx
- Notes on standard .travis.yml file compenets HOT 6
- use a GitHub Action to distribute standard workflow templates across participating repos HOT 1
- Orb environment doesn't play nice with CGO
- Fix repo permissions HOT 2
- Meta: libp2p repos still failing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci-helpers.