forked from deprecate/metal-soy-critic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts.snap
180 lines (94 loc) · 3.37 KB
/
index.ts.snap
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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`cli should accept an ignore glob 1`] = `
"0 out of 0 file(s) have problems:
"
`;
exports[`cli should fail with invalid config file 1`] = `
"Failed to read config: callToImport.regex \\"(\\\\S+\\" is not a valid RegExp.
"
`;
exports[`cli should print more with verbose flag 1`] = `
"0 out of 1 file(s) have problems:
File - test/fixtures/Test.soy
No problems were found.
"
`;
exports[`cli should print status when no errors 1`] = `
"0 out of 1 file(s) have problems:
"
`;
exports[`cli should print usage without args 1`] = `
"
Usage: index [options] <path>
Options:
-V, --version output the version number
-i, --ignore <ignore> A glob to ignore files, if passed a directory
-v, --verbose Output for all files
-h, --help output usage information
"
`;
exports[`cli should recursively look for Soy files if passed a directory 1`] = `
"15 out of 18 file(s) have problems:
File - test/fixtures/BadTernaryElvis.soy
Use the Elvis (?:) operator instead of a ternary for default values:
$optionalInfo - Line 20
File - test/fixtures/BadWhitespace.soy
There seems to be extra whitespace on these lines:
Line 8: {@param title: string }
File - test/fixtures/DocParams.soy
Param declarations in docs is deprecated, see these templates:
render
otherHelper
File - test/fixtures/InvalidJS.soy
Failed to parse component (javascript) file
File - test/fixtures/InvalidNamespace.soy
Parsing failed at 1:1. Expecting:
'{namespace'
File - test/fixtures/MissingCallImport.soy
It looks like the following component calls are missing an import:
MyExternalComponent
File - test/fixtures/MissingInternal.soy
Based on their name, these attributes should have the .internal() config added:
count_
File - test/fixtures/MissingParams.soy
These params can't be found in STATE or your Class:
optionalInfo
optionalInfo2
optionalInfo3
File - test/fixtures/MissingRender.soy
Cannot find a .render template, do you have a typo?
rander
File - test/fixtures/MissingRequired.soy
These attributes are required in your Soy Template but not in your Component:
title
These attributes are .required() in your Component but not in your Template:
description
File - test/fixtures/NoopEvents.soy
These calls are not components, so their events param will do nothing:
OtherComponent.Helper
File - test/fixtures/SortedParamDeclarations.soy
These templates need their param declarations sorted:
.render
File - test/fixtures/SortedParams.soy
Please sort the params in these calls:
OtherComponent.render - Lines 8 to 11
File - test/fixtures/TransformedImport.soy
It looks like the following component calls are missing an import:
OtherComponent
File - test/fixtures/UnsortedMap.soy
These map keys should be sorted:
Lines 10 to 12
Lines 18 to 20
"
`;
exports[`cli should run using config file 1`] = `
"0 out of 1 file(s) have problems:
"
`;
exports[`cli should validate file 1`] = `
"1 out of 1 file(s) have problems:
File - test/fixtures/MissingInternal.soy
Based on their name, these attributes should have the .internal() config added:
count_
"
`;