-
Notifications
You must be signed in to change notification settings - Fork 0
/
tyscan.yml
29 lines (23 loc) · 1.25 KB
/
tyscan.yml
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
# This is a sample configuration for TyScan.
# See the documentation at https://github.com/sider/TyScan for more details.
rules:
- # The identifier of a rule. This must be unique in a config file.
id: sample.consoleX
# The code pattern to find. This pattern finds any method call to `console` with any argument
# set. See https://github.com/sider/TyScan/blob/master/doc/pattern.md for more details.
pattern: consoleX._(...)
# The message to display when TyScan finds a code piece that matches the pattern.
message: Do not use `consoleX`.
# [Optional] The secondary message. This is intended to be used for describing the cases where
# a violation of the pattern can be ignored.
justification: Allowed when debugging.
# [Optional] You can check whether the pattern works as expected with `tyscan test`. See
# https://github.com/sider/TyScan/blob/master/doc/cli.md#test-your-patterns for more details.
tests:
# Code pieces that are expected to match the pattern.
match:
- consoleX.log('Log message');
- consoleX.error('Error message');
# Code pieces that are NOT expected to match the pattern.
unmatch:
- consoleX; # This does not match the pattern since no method is invoked.