-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
extension.neon
197 lines (161 loc) · 6.77 KB
/
extension.neon
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
parametersSchema:
todo_by: structure([
nonIgnorable: bool()
referenceTime: string()
referenceVersion: string()
singleGitRepo: bool()
virtualPackages: arrayOf(string(), string())
ticket: structure([
enabled: bool()
tracker: anyOf('jira', 'github', 'youtrack')
keyPrefixes: listOf(string())
resolvedStatuses: listOf(string())
jira: structure([
server: string()
credentials: schema(string(), nullable())
credentialsFilePath: schema(string(), nullable())
])
github: structure([
defaultOwner: string()
defaultRepo: string()
credentials: schema(string(), nullable())
credentialsFilePath: schema(string(), nullable())
])
youtrack: structure([
server: string()
credentials: schema(string(), nullable())
credentialsFilePath: schema(string(), nullable())
])
])
])
# default parameters
parameters:
todo_by:
nonIgnorable: true
# any strtotime() compatible string
referenceTime: "now"
# "nextMajor", "nextMinor", "nextPatch" or a version string like "1.2.3"
referenceVersion: "nextMajor"
# whether all files beeing analyzed are contained in the same git repository.
# If set to false, the git tags are fetched for each directory individually (slower)
singleGitRepo: true
# a map of additional packages to match package-comments against
virtualPackages: []
ticket:
# whether to analyze comments by issue tracker ticket key
enabled: false
# one of: jira, github (case-sensitive)
tracker: jira
# a case-sensitive list of status names.
# only tickets having any of these statuses are considered resolved.
# supported trackers: jira. Other trackers ignore this parameter.
resolvedStatuses: []
# if your ticket key is FOO-12345, then this value should be ["FOO"].
# multiple key prefixes are allowed, e.g. ["FOO", "APP"].
# only comments with keys containing this prefix will be analyzed.
# supported trackers: jira, youtrack. Other trackers ignore this parameter.
keyPrefixes: []
jira:
# e.g. https://your-company.atlassian.net
server: https://jira.atlassian.com
# see README for possible formats.
# if this value is empty, credentials file will be used instead.
credentials: null
# path to a file containing Jira credentials.
# see README for possible formats.
# if credentials parameter is not empty, it will be used instead of this file.
# this file must not be commited into the repository!
credentialsFilePath: null
github:
# The account owner of referenced repositories.
defaultOwner: ~
# The name of the repository without the .git extension.
defaultRepo: ~
# GitHub Access Token
# if this value is empty, credentials file will be used instead.
credentials: null
# path to a file containing GitHub Access Token.
# if credentials parameter is not empty, it will be used instead of this file.
# this file must not be committed into the repository!
credentialsFilePath: null
youtrack:
# e.g. https://your-company.youtrack.cloud
server: https://youtrack.jetbrains.com
# see README for possible formats.
# if this value is empty, credentials file will be used instead.
credentials: null
# path to a file containing YouTrack credentials.
# see README for possible formats.
# if credentials parameter is not empty, it will be used instead of this file.
# this file must not be commited into the repository!
credentialsFilePath: null
conditionalTags:
staabm\PHPStanTodoBy\TodoByTicketRule:
phpstan.rules.rule: %todo_by.ticket.enabled%
services:
-
class: staabm\PHPStanTodoBy\TodoByDateRule
tags: [phpstan.rules.rule]
arguments:
- %todo_by.referenceTime%
-
class: staabm\PHPStanTodoBy\TodoByTicketRule
-
class: staabm\PHPStanTodoBy\TodoByVersionRule
tags: [phpstan.rules.rule]
arguments:
- %todo_by.singleGitRepo%
-
class: staabm\PHPStanTodoBy\TodoBySymfonyDeprecationRule
tags: [phpstan.rules.rule]
arguments:
workingDirectory: %currentWorkingDirectory%
-
class: staabm\PHPStanTodoBy\TodoByPackageVersionRule
tags: [phpstan.rules.rule]
arguments:
workingDirectory: %currentWorkingDirectory%
virtualPackages: %todo_by.virtualPackages%
-
class: staabm\PHPStanTodoBy\TodoByIssueUrlRule
tags: [phpstan.rules.rule]
-
class: staabm\PHPStanTodoBy\utils\GitTagFetcher
-
class: staabm\PHPStanTodoBy\utils\ReferenceVersionFinder
arguments:
- %todo_by.referenceVersion%
-
class: staabm\PHPStanTodoBy\utils\ExpiredCommentErrorBuilder
arguments:
- %todo_by.nonIgnorable%
-
class: staabm\PHPStanTodoBy\utils\ticket\TicketRuleConfigurationFactory
-
class: staabm\PHPStanTodoBy\utils\ticket\TicketRuleConfiguration
factory: @staabm\PHPStanTodoBy\utils\ticket\TicketRuleConfigurationFactory::create
-
class: staabm\PHPStanTodoBy\TodoByTicketCollector
tags:
- phpstan.collector
-
class: staabm\PHPStanTodoBy\utils\ticket\GitHubTicketStatusFetcher
arguments:
- %todo_by.ticket.github.defaultOwner%
- %todo_by.ticket.github.defaultRepo%
- %todo_by.ticket.github.credentials%
- %todo_by.ticket.github.credentialsFilePath%
-
class: staabm\PHPStanTodoBy\utils\ticket\JiraTicketStatusFetcher
arguments:
- %todo_by.ticket.jira.server%
- %todo_by.ticket.jira.credentials%
- %todo_by.ticket.jira.credentialsFilePath%
-
class: staabm\PHPStanTodoBy\utils\ticket\YouTrackTicketStatusFetcher
arguments:
- %todo_by.ticket.youtrack.server%
- %todo_by.ticket.youtrack.credentials%
- %todo_by.ticket.youtrack.credentialsFilePath%
-
class: staabm\PHPStanTodoBy\utils\HttpClient