-
Notifications
You must be signed in to change notification settings - Fork 28
/
vanadium-code-annotations.yaml
61 lines (57 loc) · 2.19 KB
/
vanadium-code-annotations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
annotations:
# AddLogCall annotates functions with a logging call that records
# entry/exit from them.
- type: cloudeng.io/go/cmd/goannotate/annotators.AddLogCall
name: add-logcall
# Packages specifies the packages to be annotated. It may be overriden
# from the command line.
packages:
- "v.io/x/ref/runtime/internal/rpc/..."
- "v.io/x/ref/runtime/internal/naming/..."
# Interfaces lists the interfaces that define the API.
interfaces:
- "v.io/v23/rpc/..."
- "v.io/v23/naming/..."
# Functions lists the functions that define the API.
functions:
# Functions must have at least this number of top-level statements to
# be worth annotating.
atLeastStatements: 3
# Do not annotate functions which have this text in any comments associated
# with or within the function.
noAnnotationComment: "nologcall"
callGenerator:
type: cloudeng.io/go/cmd/goannotate/annotators/functions.LogCallWithContext
# contextType is the context type used by this API.
contextType: v.io/v23/context.T
# Import is the import path for the logging call to be added.
importPath: v.io/x/ref/lib/apilog
# logcall is the import path itself.
functionName: apilog.LogCallf
# RmLogCall removes annotations previously added to log entry/exit
# from a specified set of functions. The example here is appropriate for
# vanadium.
- type: cloudeng.io/go/cmd/goannotate/annotators.RmLogCall
name: rm-logcall
interfaces:
- "v.io/v23/..."
packages:
- "./..."
functionNameRE: apilog.LogCall
comment: "gologcop: DO NOT EDIT, MUST BE FIRST STATEMENT"
deferred: true
# EnsureCopyrightAndLicense ensures that there's a copyright and license
# comment in every go file.
- type: cloudeng.io/go/cmd/goannotate/annotators.EnsureCopyrightAndLicense
name: copyright
packages:
- "./..."
exclusions:
- ".vdl.go"
copyright: "// Copyright 2022 The Vanadium Authors. All rights reserved."
license: |
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
options:
# Default concurrency.
concurrency: 0