Skip to content

Commit 13958bf

Browse files
committed
Merge branch 'main' of github.com:gcp-kit/fti into feat/sub_collection
2 parents dfaaa08 + 0910eb4 commit 13958bf

File tree

18 files changed

+26404
-25
lines changed

18 files changed

+26404
-25
lines changed

.github/.golangci.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ linters-settings:
1010
goimports:
1111
local-prefixes: github.com/golangci/golangci-lint
1212
golint:
13-
min-confidence: 0
13+
min-confidence: 0.3
1414
govet:
1515
check-shadowing: true
1616
misspell:
@@ -36,16 +36,16 @@ linters:
3636
- gofmt
3737
# goimports
3838
- goimports
39-
# golint
40-
- golint
39+
# revive
40+
- revive
4141
# 引数がフォーマット文字列と一致しないものを検出
4242
- govet
4343
# 意味のない再代入を検出
4444
- ineffassign
4545
# スペルチェック
4646
- misspell
4747
# for中などで固定されてない変数を検出
48-
- scopelint
48+
- exportloopref
4949
# 構造体の未使用フィールドを検出
5050
- structcheck
5151
# 不要な型変換を検出
@@ -73,12 +73,9 @@ issues:
7373

7474
run:
7575
skip-dirs:
76-
- test/testdata_etc
77-
- internal/cache
78-
- internal/renameio
79-
- internal/robustio
76+
- node_modules
8077

8178
service:
82-
golangci-lint-version: 1.23.x
79+
golangci-lint-version: 1.43.x
8380
prepare:
8481
- echo "here I can run custom commands, but no preparation needed for this repo"

.github/workflows/linter.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,20 @@ jobs:
1010
- uses: actions/setup-go@v2
1111
with:
1212
go-version: 1.17
13-
- name: Install dependencies
14-
working-directory: /tmp
13+
- name: Install JRE
1514
run: |
16-
go get golang.org/x/tools/cmd/goimports
15+
sudo apt update && sudo apt install openjdk-17-jre
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: "16"
19+
cache: "npm"
20+
cache-dependency-path: package-lock.json
21+
- name: Install emulator
22+
run: |
23+
npm ci
24+
- name: Run emulator
25+
run: |
26+
make emulator &
1727
- name: Ensure samples are generated
1828
env:
1929
TZ: Asia/Tokyo
@@ -30,4 +40,4 @@ jobs:
3040
uses: golangci/golangci-lint-action@v2
3141
with:
3242
args: "--config=.github/.golangci.yml"
33-
skip-go-installation: true
43+
skip-go-installation: true`

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.idea
22
testdata/
3+
firebase-debug.log
4+
firestore-debug.log
5+
node_modules/

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.PHONY: test
2+
test:
3+
go test ./...
4+
5+
.PHONY: gen_samples
6+
gen_samples:
7+
go run ./cmd/fti -c samples/config.yaml
8+
9+
.PHONY: emulator
10+
emulator:
11+
npm run emulator

cmd/fti/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package main - メインパッケージ
12
package main
23

34
import (

firebase.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"emulators": {
3+
"firestore": {
4+
"port": "41848"
5+
}
6+
}
7+
}

0 commit comments

Comments
 (0)