Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FinClip
ligase
提交
47215583
ligase
项目概览
FinClip
/
ligase
通知
33
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ligase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
47215583
编写于
6月 12, 2017
作者:
M
Mark Haines
提交者:
GitHub
6月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add misspell and gofmt simplify to the pre-commit hooks (#138)
上级
7cbdab30
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
25 addition
and
10 deletion
+25
-10
.travis.yml
.travis.yml
+1
-0
WIRING.md
WIRING.md
+1
-1
hooks/pre-commit
hooks/pre-commit
+15
-1
src/github.com/matrix-org/dendrite/clientapi/writers/register.go
...hub.com/matrix-org/dendrite/clientapi/writers/register.go
+1
-1
src/github.com/matrix-org/dendrite/federationapi/readers/keys.go
...hub.com/matrix-org/dendrite/federationapi/readers/keys.go
+1
-1
src/github.com/matrix-org/dendrite/federationapi/writers/send.go
...hub.com/matrix-org/dendrite/federationapi/writers/send.go
+1
-1
src/github.com/matrix-org/dendrite/syncapi/sync/notifier_test.go
...hub.com/matrix-org/dendrite/syncapi/sync/notifier_test.go
+4
-4
src/github.com/matrix-org/dendrite/syncapi/types/types.go
src/github.com/matrix-org/dendrite/syncapi/types/types.go
+1
-1
未找到文件。
.travis.yml
浏览文件 @
47215583
...
...
@@ -20,6 +20,7 @@ install:
-
go get github.com/constabulary/gb/...
-
go get github.com/golang/lint/golint
-
go get github.com/fzipp/gocyclo
-
go get github.com/client9/misspell/...
# Generate a self-signed X.509 certificate for TLS.
before_script
:
...
...
WIRING.md
浏览文件 @
47215583
...
...
@@ -163,7 +163,7 @@ choke-point to implement ratelimiting and backoff correctly.
*
Reads the current state of the rooms from the logs to track the intersection
of room membership between users.
*
Reads updates to presence from the logs writen by the FS and the CPS.
*
Reads updates to presence from the logs writ
t
en by the FS and the CPS.
*
Reads when clients sync from the logs from the Client Sync.
*
Tracks any timers for users.
*
Writes the changes to presence state to the logs.
...
...
hooks/pre-commit
浏览文件 @
47215583
...
...
@@ -3,7 +3,21 @@
set
-eu
golint src/...
go
fmt
./src/...
misspell
-error
src
*
.md
# gofmt doesn't exit with an error code if the files don't match the expected
# format. So we have to run it and see if it outputs anything.
if
gofmt
-l
-s
./src/ 2>&1 |
read
then
echo
"Error: not all code had been formatted with gofmt."
echo
"Fixing the following files"
gofmt
-s
-w
-l
./src/
echo
echo
"Please add them to the commit"
git status
--short
exit
1
fi
go tool vet
--all
--shadow
./src
gocyclo
-over
12 src/
gb
test
...
...
src/github.com/matrix-org/dendrite/clientapi/writers/register.go
浏览文件 @
47215583
...
...
@@ -26,7 +26,7 @@ const (
// Registration parameters vary depending on the request, and will need to remembered across
// sessions. If no parameters are supplied, the server should use the parameters previously
// remembered. If ANY parameters are supplied, the server should REPLACE all knowledge of
// previous paramters with the ones supplied. This mean you cannot "build up" request params.
// previous param
e
ters with the ones supplied. This mean you cannot "build up" request params.
type
registerRequest
struct
{
// registration parameters.
Password
string
`json:"password"`
...
...
src/github.com/matrix-org/dendrite/federationapi/readers/keys.go
浏览文件 @
47215583
...
...
@@ -43,7 +43,7 @@ func localKeys(cfg config.FederationAPI, validUntil time.Time) (*gomatrixserverl
publicKey
:=
cfg
.
PrivateKey
.
Public
()
.
(
ed25519
.
PublicKey
)
keys
.
VerifyKeys
=
map
[
gomatrixserverlib
.
KeyID
]
gomatrixserverlib
.
VerifyKey
{
cfg
.
KeyID
:
gomatrixserverlib
.
VerifyKey
{
cfg
.
KeyID
:
{
gomatrixserverlib
.
Base64String
(
publicKey
),
},
}
...
...
src/github.com/matrix-org/dendrite/federationapi/writers/send.go
浏览文件 @
47215583
...
...
@@ -184,7 +184,7 @@ func (t *txnReq) processEventWithMissingState(e gomatrixserverlib.Event) error {
// or /state.
// Synapse will attempt to do 1 and if that fails or if the gap is
// too large then it will attempt 2.
// Synapse will use /state_ids if possible since usu
s
ally the state
// Synapse will use /state_ids if possible since usually the state
// is largely unchanged and it is more efficient to fetch a list of
// event ids and then use /event to fetch the individual events.
// However not all version of synapse support /state_ids so you may
...
...
src/github.com/matrix-org/dendrite/syncapi/sync/notifier_test.go
浏览文件 @
47215583
...
...
@@ -104,7 +104,7 @@ func TestImmediateNotification(t *testing.T) {
func
TestNewEventAndJoinedToRoom
(
t
*
testing
.
T
)
{
n
:=
NewNotifier
(
streamPositionBefore
)
n
.
setUsersJoinedToRooms
(
map
[
string
][]
string
{
roomID
:
[]
string
{
alice
,
bob
},
roomID
:
{
alice
,
bob
},
})
var
wg
sync
.
WaitGroup
...
...
@@ -132,7 +132,7 @@ func TestNewEventAndJoinedToRoom(t *testing.T) {
func
TestNewInviteEventForUser
(
t
*
testing
.
T
)
{
n
:=
NewNotifier
(
streamPositionBefore
)
n
.
setUsersJoinedToRooms
(
map
[
string
][]
string
{
roomID
:
[]
string
{
alice
,
bob
},
roomID
:
{
alice
,
bob
},
})
var
wg
sync
.
WaitGroup
...
...
@@ -160,7 +160,7 @@ func TestNewInviteEventForUser(t *testing.T) {
func
TestMultipleRequestWakeup
(
t
*
testing
.
T
)
{
n
:=
NewNotifier
(
streamPositionBefore
)
n
.
setUsersJoinedToRooms
(
map
[
string
][]
string
{
roomID
:
[]
string
{
alice
,
bob
},
roomID
:
{
alice
,
bob
},
})
var
wg
sync
.
WaitGroup
...
...
@@ -198,7 +198,7 @@ func TestNewEventAndWasPreviouslyJoinedToRoom(t *testing.T) {
// Make sure alice gets woken up only and not bob as well.
n
:=
NewNotifier
(
streamPositionBefore
)
n
.
setUsersJoinedToRooms
(
map
[
string
][]
string
{
roomID
:
[]
string
{
alice
,
bob
},
roomID
:
{
alice
,
bob
},
})
var
leaveWG
sync
.
WaitGroup
...
...
src/github.com/matrix-org/dendrite/syncapi/types/types.go
浏览文件 @
47215583
...
...
@@ -50,7 +50,7 @@ func NewResponse(pos StreamPosition) *Response {
// Make sure we send the next_batch as a string. We don't want to confuse clients by sending this
// as an integer even though (at the moment) it is.
res
.
NextBatch
=
pos
.
String
()
// Pre-initalise the maps. Synapse will return {} even if there are no rooms under a specific section,
// Pre-init
i
alise the maps. Synapse will return {} even if there are no rooms under a specific section,
// so let's do the same thing. Bonus: this means we can't get dreaded 'assignment to entry in nil map' errors.
res
.
Rooms
.
Join
=
make
(
map
[
string
]
JoinResponse
)
res
.
Rooms
.
Invite
=
make
(
map
[
string
]
InviteResponse
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录