.github/workflow: Add an atomic align check

Closes #1661
This commit is contained in:
Hajime Hoshi 2021-08-28 02:32:24 +09:00
parent e9a4d99f6a
commit d378c12107
2 changed files with 32 additions and 0 deletions

View File

@ -67,6 +67,11 @@ jobs:
run: | run: |
go vet -tags=example -v ./... go vet -tags=example -v ./...
- name: go vet (atomic align)
run: |
go install .github/workflows/vettools/atomicalign.go
go vet -vettool=$(which atomicalign) -tags=example -v ./...
- name: go build - name: go build
run: | run: |
go build -tags=example -v ./... go build -tags=example -v ./...

View File

@ -0,0 +1,27 @@
// Copyright 2021 The Ebiten Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main
import (
"golang.org/x/tools/go/analysis/multichecker"
"golang.org/x/tools/go/analysis/passes/atomicalign"
)
func main() {
multichecker.Main(atomicalign.Analyzer)
}