Skip to content

Commit

Permalink
lint: ensure conformity with asmfmt
Browse files Browse the repository at this point in the history
Run asmfmt suring linting and confirm git repository isn't dirty.
This introduces a developer tools dependency on asmfmt, but not a
runtime dependency.

Updates mmcloughlin#8
  • Loading branch information
mmcloughlin committed Jan 11, 2019
1 parent f77a2e3 commit 7a22924
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 257 deletions.
3 changes: 3 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ go get -u github.com/campoy/embedmd

# covertool for merging coverage reports
go get -u github.com/dlespiau/covertool

# asmfmt for enforcing assembly style
go get -u github.com/klauspost/asmfmt
5 changes: 5 additions & 0 deletions script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
./script/generate
test -z "$(git status --porcelain)"

# And it's still clean after asmfmt.
# Note: we want to confirm we agree with asmfmt without actually depending on it.
find . -name '*.s' | xargs asmfmt -w
test -z "$(git status --porcelain)"

# Run suite of golangci-lint checks.
golangci-lint run
2 changes: 1 addition & 1 deletion tests/textflag/make_attrtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func PrintAttributesTest(w io.Writer, as []attr.Attribute) {
fmt.Fprintf(w, "\tCMPW R8, R9\n")

cont := fmt.Sprintf("cont%d", i)
fmt.Fprintf(w, "\tJE %s\n", cont)
fmt.Fprintf(w, "\tJE %s\n", cont)
fmt.Fprintf(w, "\tRET\n")

fmt.Fprintf(w, "%s:\n", cont)
Expand Down
Loading

0 comments on commit 7a22924

Please sign in to comment.