@terafina/tffa-sfdx-plugin 2.2.3-rc.3 → 2.2.3-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/bin/pmd/apex_ruleset.xml +126 -292
- package/bin/pmd/apex_test_ruleset.xml +36 -0
- package/lib/shared/lint/apex-pmd.js +8 -15
- package/lib/shared/lint/apex-pmd.js.map +1 -1
- package/lib/shared/lint/ignored-files.d.ts +1 -0
- package/lib/shared/lint/ignored-files.js +13 -2
- package/lib/shared/lint/ignored-files.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ $ npm install -g @terafina/tffa-sfdx-plugin
|
|
|
41
41
|
$ sfdx COMMAND
|
|
42
42
|
running command...
|
|
43
43
|
$ sfdx (--version|-v)
|
|
44
|
-
@terafina/tffa-sfdx-plugin/2.2.3-rc.
|
|
44
|
+
@terafina/tffa-sfdx-plugin/2.2.3-rc.6 linux-x64 node-v16.13.1
|
|
45
45
|
$ sfdx --help [COMMAND]
|
|
46
46
|
USAGE
|
|
47
47
|
$ sfdx COMMAND
|
|
@@ -102,7 +102,7 @@ EXAMPLES
|
|
|
102
102
|
Generate Apex API Documentation : $sfdx tffa:apexdoc
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.
|
|
105
|
+
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.6/src/commands/tffa/apexdoc.ts)_
|
|
106
106
|
|
|
107
107
|
## `sfdx tffa:lint [-s <directory>] [-m <integer>] [-p] [-r <filepath>] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
108
108
|
|
|
@@ -131,7 +131,7 @@ EXAMPLES
|
|
|
131
131
|
Scan a sfdx project and provide list of code violations : $sfdx tffa:scan
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.
|
|
134
|
+
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.6/src/commands/tffa/lint.ts)_
|
|
135
135
|
|
|
136
136
|
## `sfdx tffa:meta [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
137
137
|
|
|
@@ -160,7 +160,7 @@ EXAMPLES
|
|
|
160
160
|
scan a sfdx project for metadata : $sfdx tffa:meta
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.
|
|
163
|
+
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.6/src/commands/tffa/meta.ts)_
|
|
164
164
|
|
|
165
165
|
## `sfdx tffa:ping [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
166
166
|
|
|
@@ -182,7 +182,7 @@ EXAMPLES
|
|
|
182
182
|
$ sfdx tffa:ping
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.
|
|
185
|
+
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v2.2.3-rc.6/src/commands/tffa/ping.ts)_
|
|
186
186
|
|
|
187
187
|
## `sfdx version`
|
|
188
188
|
|
package/bin/pmd/apex_ruleset.xml
CHANGED
|
@@ -2,308 +2,142 @@
|
|
|
2
2
|
<ruleset
|
|
3
3
|
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
|
4
4
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
5
|
-
name="
|
|
6
|
-
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0
|
|
5
|
+
name="TFFA ruleset for Salesforce.com Apex"
|
|
6
|
+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"
|
|
7
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
|
-
<priority>3</priority>
|
|
41
|
-
<properties />
|
|
42
|
-
</rule>
|
|
43
|
-
<rule
|
|
44
|
-
ref="category/apex/bestpractices.xml/ApexUnitTestMethodShouldHaveIsTestAnnotation"
|
|
45
|
-
message="Apex test methods should have @isTest annotation."
|
|
46
|
-
>
|
|
47
|
-
<priority>3</priority>
|
|
48
|
-
<properties />
|
|
49
|
-
</rule>
|
|
50
|
-
<rule
|
|
51
|
-
ref="category/apex/bestpractices.xml/ApexUnitTestShouldNotUseSeeAllDataTrue"
|
|
52
|
-
message="@isTest(seeAllData=true) should not be used in Apex unit tests because it opens up the existing database data for unexpected modification by tests"
|
|
53
|
-
>
|
|
54
|
-
<priority>3</priority>
|
|
55
|
-
<properties />
|
|
56
|
-
</rule>
|
|
57
|
-
<!-- DESIGN -->
|
|
8
|
+
<description>TFFA ruleset for Salesforce.com Apex</description>
|
|
9
|
+
<exclude-pattern>.*</exclude-pattern>
|
|
10
|
+
<include-pattern>.*/app/main/default/classes/.*</include-pattern>
|
|
11
|
+
<include-pattern>.*/app/main/default/triggers/.*</include-pattern>
|
|
12
|
+
<!--SECURITY -->
|
|
13
|
+
<rule ref="category/apex/security.xml">
|
|
14
|
+
<priority>1</priority>
|
|
15
|
+
<exclude name="ApexOpenRedirect" />
|
|
16
|
+
<exclude name="ApexBadCrypto" />
|
|
17
|
+
<exclude name="ApexSuggestUsingNamedCred" />
|
|
18
|
+
</rule>
|
|
19
|
+
<!--SECURITY -->
|
|
20
|
+
<!--DESIGN -->
|
|
21
|
+
<rule ref="category/apex/design.xml">
|
|
22
|
+
<exclude name="StdCyclomaticComplexity" />
|
|
23
|
+
<exclude name="ExcessivePublicCount" />
|
|
24
|
+
<exclude name="CyclomaticComplexity" />
|
|
25
|
+
<exclude name="CognitiveComplexity" />
|
|
26
|
+
<exclude name="TooManyFields" />
|
|
27
|
+
<exclude name="NcssMethodCount" />
|
|
28
|
+
<exclude name="NcssConstructorCount" />
|
|
29
|
+
<exclude name="ExcessiveParameterList" />
|
|
30
|
+
<exclude name="NcssTypeCount" />
|
|
31
|
+
<exclude name="ExcessiveClassLength" />
|
|
32
|
+
<exclude name="AvoidDeeplyNestedIfStmts" />
|
|
33
|
+
</rule>
|
|
34
|
+
<rule ref="category/apex/design.xml/AvoidDeeplyNestedIfStmts" message="Deeply nested if..else statements are hard to read">
|
|
35
|
+
<priority>3</priority>
|
|
36
|
+
<properties>
|
|
37
|
+
<property name="problemDepth" value="10" />
|
|
38
|
+
</properties>
|
|
39
|
+
</rule>
|
|
58
40
|
<rule ref="category/apex/design.xml/ExcessiveClassLength" message="Avoid really long classes (lines of code)">
|
|
59
41
|
<priority>3</priority>
|
|
60
42
|
<properties>
|
|
61
43
|
<property name="minimum" value="4000" />
|
|
62
44
|
</properties>
|
|
63
45
|
</rule>
|
|
64
|
-
|
|
65
|
-
<priority>3</priority>
|
|
66
|
-
<properties>
|
|
67
|
-
<property name="minimum" value="10" />
|
|
68
|
-
</properties>
|
|
69
|
-
</rule>
|
|
70
|
-
<!-- <rule ref="category/apex/design.xml/ExcessivePublicCount" message="This class has too many public methods and attributes">
|
|
71
|
-
<priority>3</priority>
|
|
72
|
-
<properties>
|
|
73
|
-
<property name="minimum" value="1000" />
|
|
74
|
-
</properties>
|
|
75
|
-
</rule> -->
|
|
76
|
-
<rule ref="category/apex/design.xml/NcssConstructorCount" message="The constructor has an NCSS line count of {0}">
|
|
77
|
-
<priority>3</priority>
|
|
78
|
-
<properties>
|
|
79
|
-
<property name="minimum" value="40" />
|
|
80
|
-
</properties>
|
|
81
|
-
</rule>
|
|
82
|
-
<rule ref="category/apex/design.xml/NcssMethodCount" message="The method has an NCSS line count of {1}">
|
|
83
|
-
<priority>3</priority>
|
|
84
|
-
<properties>
|
|
85
|
-
<property name="minimum" value="200" />
|
|
86
|
-
</properties>
|
|
87
|
-
</rule>
|
|
88
|
-
<rule ref="category/apex/design.xml/NcssTypeCount" message="The type has an NCSS line count of {0}">
|
|
46
|
+
<rule ref="category/apex/design.xml/NcssTypeCount" message="The type has an NCSS line count of {0}">
|
|
89
47
|
<priority>3</priority>
|
|
90
48
|
<properties>
|
|
91
49
|
<property name="minimum" value="1500" />
|
|
92
50
|
</properties>
|
|
93
51
|
</rule>
|
|
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
|
-
</rule>
|
|
186
|
-
<!-- SECURITY -->
|
|
187
|
-
<rule ref="category/apex/security.xml/ApexInsecureEndpoint" message="Apex callouts should use encrypted communication channels">
|
|
188
|
-
<priority>3</priority>
|
|
189
|
-
<properties />
|
|
190
|
-
</rule>
|
|
191
|
-
<rule
|
|
192
|
-
ref="category/apex/security.xml/ApexSharingViolations"
|
|
193
|
-
message="Apex classes should declare a sharing model if DML or SOQL/SOSL is used"
|
|
194
|
-
>
|
|
195
|
-
<priority>3</priority>
|
|
196
|
-
<properties />
|
|
197
|
-
</rule>
|
|
198
|
-
<!-- <rule ref="category/apex/security.xml/ApexOpenRedirect" message="Apex classes should safely redirect to a known location">
|
|
199
|
-
<priority>3</priority>
|
|
200
|
-
<properties />
|
|
201
|
-
</rule> -->
|
|
202
|
-
<rule ref="category/apex/security.xml/ApexSOQLInjection" message="Apex classes should escape variables merged in DML query">
|
|
203
|
-
<priority>3</priority>
|
|
204
|
-
<properties />
|
|
205
|
-
</rule>
|
|
206
|
-
<rule ref="category/apex/security.xml/ApexXSSFromURLParam" message="Apex classes should escape Strings obtained from URL parameters">
|
|
207
|
-
<priority>3</priority>
|
|
208
|
-
<properties />
|
|
209
|
-
</rule>
|
|
210
|
-
<rule ref="category/apex/security.xml/ApexXSSFromEscapeFalse" message="Apex classes should escape addError strings">
|
|
211
|
-
<priority>3</priority>
|
|
212
|
-
<properties />
|
|
213
|
-
</rule>
|
|
214
|
-
<rule ref="category/apex/security.xml/ApexBadCrypto" message="Apex Crypto should use random IV/key">
|
|
215
|
-
<priority>3</priority>
|
|
216
|
-
<properties />
|
|
217
|
-
</rule>
|
|
218
|
-
<rule ref="category/apex/security.xml/ApexCRUDViolation" message="Validate CRUD permission before SOQL/DML operation">
|
|
219
|
-
<priority>3</priority>
|
|
220
|
-
<properties />
|
|
221
|
-
</rule>
|
|
222
|
-
<rule ref="category/apex/security.xml/ApexDangerousMethods" message="Calling potentially dangerous method">
|
|
223
|
-
<priority>3</priority>
|
|
224
|
-
<properties />
|
|
225
|
-
</rule>
|
|
226
|
-
<!-- <rule ref="category/apex/security.xml/ApexSuggestUsingNamedCred" message="Consider using named credentials for authenticated callouts">
|
|
227
|
-
<priority>3</priority>
|
|
228
|
-
<properties />
|
|
229
|
-
</rule> -->
|
|
230
|
-
<!-- ERROR PRONE -->
|
|
231
|
-
|
|
232
|
-
<rule
|
|
233
|
-
ref="category/apex/errorprone.xml/MethodWithSameNameAsEnclosingClass"
|
|
234
|
-
message="Classes should not have non-constructor methods with the same name as the class"
|
|
235
|
-
>
|
|
236
|
-
<priority>3</priority>
|
|
237
|
-
<properties />
|
|
238
|
-
</rule>
|
|
239
|
-
<rule ref="category/apex/errorprone.xml/ApexCSRF" message="Avoid making DML operations in Apex class constructor/init method">
|
|
240
|
-
<priority>3</priority>
|
|
241
|
-
<properties />
|
|
242
|
-
</rule>
|
|
243
|
-
<rule ref="category/apex/errorprone.xml/EmptyCatchBlock" message="Avoid empty catch blocks">
|
|
244
|
-
<priority>3</priority>
|
|
245
|
-
<properties >
|
|
246
|
-
<property name="allowCommentedBlocks" value="true" />
|
|
247
|
-
<property name="allowExceptionNameRegex" value="^(ignored|expected)$" />
|
|
248
|
-
</properties>
|
|
249
|
-
</rule>
|
|
250
|
-
<rule ref="category/apex/errorprone.xml/EmptyIfStmt" message="Avoid empty 'if' statements">
|
|
251
|
-
<priority>3</priority>
|
|
252
|
-
<properties />
|
|
253
|
-
</rule>
|
|
254
|
-
<rule ref="category/apex/errorprone.xml/AvoidDirectAccessTriggerMap" message="Avoid directly accessing Trigger.old and Trigger.new">
|
|
255
|
-
<priority>3</priority>
|
|
256
|
-
<properties />
|
|
257
|
-
</rule>
|
|
258
|
-
<rule ref="category/apex/errorprone.xml/AvoidNonExistentAnnotations">
|
|
259
|
-
<properties />
|
|
260
|
-
</rule>
|
|
261
|
-
<rule ref="category/apex/errorprone.xml/AvoidHardcodingId" message="Avoid hardcoding ID's">
|
|
262
|
-
<priority>3</priority>
|
|
263
|
-
<properties />
|
|
264
|
-
</rule>
|
|
265
|
-
|
|
266
|
-
<rule ref="category/apex/errorprone.xml/EmptyWhileStmt" message="Avoid empty 'while' statements">
|
|
267
|
-
<priority>3</priority>
|
|
268
|
-
<properties />
|
|
269
|
-
</rule>
|
|
270
|
-
<rule ref="category/apex/errorprone.xml/EmptyTryOrFinallyBlock" message="Avoid empty try or finally blocks">
|
|
271
|
-
<priority>3</priority>
|
|
272
|
-
<properties />
|
|
273
|
-
</rule>
|
|
274
|
-
<rule
|
|
275
|
-
ref="category/apex/errorprone.xml/InaccessibleAuraEnabledGetter"
|
|
276
|
-
message="AuraEnabled getter must be public or global if is referenced in Lightning components"
|
|
277
|
-
>
|
|
278
|
-
<priority>3</priority>
|
|
279
|
-
<properties />
|
|
280
|
-
</rule>
|
|
281
|
-
<rule
|
|
282
|
-
ref="category/apex/errorprone.xml/MethodWithSameNameAsEnclosingClass"
|
|
283
|
-
message="Non-constructor methods should not have the same name as the enclosing class."
|
|
284
|
-
>
|
|
285
|
-
<priority>3</priority>
|
|
286
|
-
<properties />
|
|
287
|
-
</rule>
|
|
288
|
-
<rule ref="category/apex/errorprone.xml/OverrideBothEqualsAndHashcode" message="Ensure you override both equals() and hashCode()">
|
|
289
|
-
<priority>3</priority>
|
|
290
|
-
<properties />
|
|
291
|
-
</rule>
|
|
292
|
-
<rule ref="category/apex/errorprone.xml/TestMethodsMustBeInTestClasses" message="Test methods must be in test classes">
|
|
293
|
-
<priority>3</priority>
|
|
294
|
-
<properties />
|
|
295
|
-
</rule>
|
|
296
|
-
<!-- END ERROR PRONE -->
|
|
297
|
-
<!-- DOCUMENTATION -->
|
|
298
|
-
<!-- <rule ref="category/apex/documentation.xml/ApexDoc" message="ApexDoc comment is missing or incorrect">
|
|
299
|
-
<priority>3</priority>
|
|
300
|
-
<properties>
|
|
301
|
-
<property name="reportPrivate" value="false" />
|
|
302
|
-
<property name="reportProtected" value="false" />
|
|
303
|
-
<property name="reportMissingDescription" value="false" />
|
|
304
|
-
<property name="reportProperty" value="false" />
|
|
305
|
-
|
|
306
|
-
</properties>
|
|
307
|
-
</rule> -->
|
|
308
|
-
<!-- END DOCUMENTATION -->
|
|
52
|
+
<!--DESIGN -->
|
|
53
|
+
<!-- BEST PRACTICES -->
|
|
54
|
+
<rule ref="category/apex/bestpractices.xml">
|
|
55
|
+
<exclude name="ApexAssertionsShouldIncludeMessage" />
|
|
56
|
+
<exclude name="AvoidGlobalModifier" />
|
|
57
|
+
<exclude name="UnusedLocalVariable" />
|
|
58
|
+
<exclude name="DebugsShouldUseLoggingLevel" />
|
|
59
|
+
|
|
60
|
+
</rule>
|
|
61
|
+
<!-- BEST PRACTICES -->
|
|
62
|
+
<!-- DOCUMENTATION -->
|
|
63
|
+
<rule ref="category/apex/documentation.xml">
|
|
64
|
+
<exclude name="ApexDoc" />
|
|
65
|
+
</rule>
|
|
66
|
+
<!-- DOCUMENTATION -->
|
|
67
|
+
<!-- PERFORMANCE -->
|
|
68
|
+
<rule ref="category/apex/performance.xml">
|
|
69
|
+
<exclude name="EagerlyLoadedDescribeSObjectResult" />
|
|
70
|
+
<exclude name="AvoidDebugStatements" />
|
|
71
|
+
</rule>
|
|
72
|
+
<rule ref="category/apex/performance.xml/AvoidDebugStatements" message="Avoid System.debug statements use tffa.Logger instead">
|
|
73
|
+
<priority>3</priority>
|
|
74
|
+
<properties />
|
|
75
|
+
</rule>
|
|
76
|
+
<!-- PERFORMANCE -->
|
|
77
|
+
<!-- CODE STYLE -->
|
|
78
|
+
<rule ref="category/apex/codestyle.xml">
|
|
79
|
+
<priority>3</priority>
|
|
80
|
+
<exclude name="FieldDeclarationsShouldBeAtStart" />
|
|
81
|
+
<exclude name="IfElseStmtsMustUseBraces" />
|
|
82
|
+
<exclude name="IfStmtsMustUseBraces" />
|
|
83
|
+
<exclude name="MethodNamingConventions" />
|
|
84
|
+
<exclude name="FieldNamingConventions" />
|
|
85
|
+
<exclude name="PropertyNamingConventions" />
|
|
86
|
+
<exclude name="FormalParameterNamingConventions" />
|
|
87
|
+
<exclude name="LocalVariableNamingConventions" />
|
|
88
|
+
|
|
89
|
+
</rule>
|
|
90
|
+
<rule ref="category/apex/codestyle.xml/MethodNamingConventions" message="Method name does not begin with a lower case character.">
|
|
91
|
+
<priority>3</priority>
|
|
92
|
+
<properties>
|
|
93
|
+
<property name="testPattern" value="[a-zA-Z0-9_]*" />
|
|
94
|
+
<property name="staticPattern" value="[a-zA-Z0-9_]*" />
|
|
95
|
+
<property name="instancePattern" value="[a-zA-Z0-9_]*" />
|
|
96
|
+
</properties>
|
|
97
|
+
</rule>
|
|
98
|
+
<rule ref="category/apex/codestyle.xml/FieldNamingConventions" message="The {0} name doesn''t match ''{2}''">
|
|
99
|
+
<priority>3</priority>
|
|
100
|
+
<properties>
|
|
101
|
+
<property name="enumConstantPattern" value="[A-Z][a-zA-Z0-9_]*" />
|
|
102
|
+
<property name="constantPattern" value="[a-zA-Z0-9_]*" />
|
|
103
|
+
<property name="finalPattern" value="[a-zA-Z0-9_]*" />
|
|
104
|
+
<property name="staticPattern" value="[a-zA-Z0-9_]*" />
|
|
105
|
+
<property name="instancePattern" value="[a-zA-Z][a-zA-Z0-9_]*" />
|
|
106
|
+
</properties>
|
|
107
|
+
</rule>
|
|
108
|
+
<rule ref="category/apex/codestyle.xml/PropertyNamingConventions" message="The {0} name doesn''t match ''{2}''">
|
|
109
|
+
<priority>3</priority>
|
|
110
|
+
<properties>
|
|
111
|
+
<property name="staticPattern" value="[a-zA-Z][a-z_A-Z0-9]*" />
|
|
112
|
+
<property name="instancePattern" value="[a-zA-Z][a-z_A-Z0-9]*" />
|
|
113
|
+
</properties>
|
|
114
|
+
</rule>
|
|
115
|
+
<rule ref="category/apex/codestyle.xml/FormalParameterNamingConventions" message="The {0} name doesn''t match ''{2}''">
|
|
116
|
+
<priority>3</priority>
|
|
117
|
+
<properties>
|
|
118
|
+
<property name="finalMethodParameterPattern" value="[a-z][a-zA-Z0-9]*" />
|
|
119
|
+
<property name="methodParameterPattern" value="[a-z][a-zA-Z0-9_]*" />
|
|
120
|
+
</properties>
|
|
121
|
+
</rule>
|
|
122
|
+
<rule ref="category/apex/codestyle.xml/LocalVariableNamingConventions" message="The {0} name doesn''t match ''{2}''">
|
|
123
|
+
<priority>3</priority>
|
|
124
|
+
<properties>
|
|
125
|
+
<property name="finalLocalPattern" value="[a-z][a-zA-Z0-9]*" />
|
|
126
|
+
<property name="localPattern" value="[a-z][a-zA-Z0-9]*" />
|
|
127
|
+
</properties>
|
|
128
|
+
</rule>
|
|
129
|
+
<!-- CODE STYLE -->
|
|
130
|
+
<!-- ERROR PRONE -->
|
|
131
|
+
<rule ref="category/apex/errorprone.xml">
|
|
132
|
+
<exclude name="EmptyCatchBlock" />
|
|
133
|
+
<exclude name="EmptyStatementBlock" />
|
|
134
|
+
</rule>
|
|
135
|
+
<rule ref="category/apex/errorprone.xml/EmptyCatchBlock" message="Avoid empty catch blocks">
|
|
136
|
+
<priority>3</priority>
|
|
137
|
+
<properties>
|
|
138
|
+
<property name="allowCommentedBlocks" value="true" />
|
|
139
|
+
<property name="allowExceptionNameRegex" value="^(ignored|expected)$" />
|
|
140
|
+
</properties>
|
|
141
|
+
</rule>
|
|
142
|
+
<!-- END ERROR PRONE -->
|
|
309
143
|
</ruleset>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<ruleset
|
|
3
|
+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
5
|
+
name="TFFA ruleset for Salesforce.com Apex tests"
|
|
6
|
+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"
|
|
7
|
+
>
|
|
8
|
+
<description>TFFA ruleset for Salesforce.com Apex tests</description>
|
|
9
|
+
<exclude-pattern>.*</exclude-pattern>
|
|
10
|
+
<include-pattern>.*/app/test/default/classes/.*</include-pattern>
|
|
11
|
+
<!-- BEST PRACTICES -->
|
|
12
|
+
<rule ref="category/apex/bestpractices.xml">
|
|
13
|
+
<priority>1</priority>
|
|
14
|
+
<exclude name="ApexAssertionsShouldIncludeMessage" />
|
|
15
|
+
<exclude name="AvoidGlobalModifier" />
|
|
16
|
+
<exclude name="UnusedLocalVariable" />
|
|
17
|
+
<exclude name="DebugsShouldUseLoggingLevel" />
|
|
18
|
+
</rule>
|
|
19
|
+
<!-- BEST PRACTICES -->
|
|
20
|
+
<!-- ERROR PRONE -->
|
|
21
|
+
<rule ref="category/apex/errorprone.xml">
|
|
22
|
+
<exclude name="EmptyCatchBlock" />
|
|
23
|
+
<exclude name="EmptyStatementBlock" />
|
|
24
|
+
<exclude name="AvoidHardcodingId" />
|
|
25
|
+
</rule>
|
|
26
|
+
<rule ref="category/apex/errorprone.xml/EmptyCatchBlock" message="Avoid empty catch blocks">
|
|
27
|
+
<priority>3</priority>
|
|
28
|
+
<properties>
|
|
29
|
+
<property name="allowCommentedBlocks" value="true" />
|
|
30
|
+
<property name="allowExceptionNameRegex" value="^(ignored|expected)$" />
|
|
31
|
+
</properties>
|
|
32
|
+
</rule>
|
|
33
|
+
<!-- END ERROR PRONE -->
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
</ruleset>
|
|
@@ -29,6 +29,7 @@ class ApexPMD {
|
|
|
29
29
|
}
|
|
30
30
|
catch (err) {
|
|
31
31
|
console.error(err);
|
|
32
|
+
return [];
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
async executeCmd(targetPath, rulesetpath) {
|
|
@@ -39,14 +40,14 @@ class ApexPMD {
|
|
|
39
40
|
const javaExc = path.join(javaHome, 'bin', 'java');
|
|
40
41
|
const commandBufferSize = 64;
|
|
41
42
|
const pmdBinPath = path.join(__dirname, '../../../', 'bin', 'pmd');
|
|
42
|
-
let rulesetsArg = path.join(pmdBinPath, 'apex_ruleset.xml');
|
|
43
|
+
let rulesetsArg = path.join(pmdBinPath, 'apex_ruleset.xml') + ',' + path.join(pmdBinPath, 'apex_test_ruleset.xml');
|
|
43
44
|
if (rulesetpath) {
|
|
44
45
|
rulesetsArg = rulesetpath;
|
|
45
46
|
}
|
|
46
47
|
const rulesetsKey = `-R "${rulesetsArg}"`;
|
|
47
48
|
const classPath = [path.join(pmdBinPath, 'lib', '*')].join(CLASSPATH_DELM);
|
|
48
49
|
const pmdKeys = `${formatKey} ${cacheKey} ${targetPathKey} ${rulesetsKey}`;
|
|
49
|
-
const cmd =
|
|
50
|
+
const cmd = `"${javaExc}" -cp "${classPath}" net.sourceforge.pmd.PMD ${pmdKeys}`;
|
|
50
51
|
this.logger.info('PMD Command: ' + cmd);
|
|
51
52
|
const pmdCmd = ChildProcess.exec(cmd, {
|
|
52
53
|
maxBuffer: Math.max(commandBufferSize, 1) * 1024 * 1024
|
|
@@ -92,8 +93,10 @@ class ApexPMD {
|
|
|
92
93
|
const violationMap = new Map();
|
|
93
94
|
for (const f of p.files) {
|
|
94
95
|
for (const v of f.violations) {
|
|
95
|
-
const
|
|
96
|
-
|
|
96
|
+
const file = f.filename;
|
|
97
|
+
const filename = path.basename(file, '.cls');
|
|
98
|
+
if (this.ignoreFiles.indexOf(filename) >= 0 || this.ignoreFiles.indexOf(file) >= 0) {
|
|
99
|
+
this.logger.warn('Ignore file ' + filename);
|
|
97
100
|
continue;
|
|
98
101
|
}
|
|
99
102
|
const key = v.ruleset + '-' + v.rule;
|
|
@@ -103,7 +106,7 @@ class ApexPMD {
|
|
|
103
106
|
label: v.ruleset + '-' + v.rule + ' (' + v.externalInfoUrl + ')',
|
|
104
107
|
message: v.description,
|
|
105
108
|
category: 'PMD',
|
|
106
|
-
level: v.priority
|
|
109
|
+
level: v.priority < 3 ? 'FATAL' : 'WARN',
|
|
107
110
|
exceptions: [filename + '#' + v.beginline]
|
|
108
111
|
};
|
|
109
112
|
}
|
|
@@ -111,16 +114,6 @@ class ApexPMD {
|
|
|
111
114
|
o.exceptions = [filename + '#' + v.beginline, ...o.exceptions];
|
|
112
115
|
}
|
|
113
116
|
violationMap.set(key, o);
|
|
114
|
-
o = {
|
|
115
|
-
label: v.ruleset + '-' + v.rule,
|
|
116
|
-
message: v.description + v.externalInfoUrl,
|
|
117
|
-
category: 'PMD',
|
|
118
|
-
level: v.priority === 2 ? 'ERROR' : 'WARN',
|
|
119
|
-
exceptions: [filename + '#' + v.beginline]
|
|
120
|
-
};
|
|
121
|
-
if (this.ignoreFiles.indexOf(filename) < 0) {
|
|
122
|
-
violations.push(o);
|
|
123
|
-
}
|
|
124
117
|
}
|
|
125
118
|
}
|
|
126
119
|
violations = Array.from(violationMap.values());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apex-pmd.js","sourceRoot":"","sources":["../../../src/shared/lint/apex-p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C,CAAC,eAAe,GAAG,GAAG;wBAChE,OAAO,EAAE,CAAC,CAAC,WAAW;wBACtB,QAAQ,EAAE,KAAK;wBACf,KAAK,EAAE,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;wBACxC,UAAU,EAAE,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC,SAAS,CAAC;qBAC3C,CAAC;iBACH;qBAAM;oBACL,CAAC,CAAC,UAAU,GAAG,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;iBAChE;gBACD,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;aAC1B;SACF;QACD,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QAE/C,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAlHD,0BAkHC"}
|
|
@@ -10,17 +10,28 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
10
10
|
class IgnoredFiles {
|
|
11
11
|
static async init(sourceFolder) {
|
|
12
12
|
this.logger = await core_1.Logger.root();
|
|
13
|
+
const currentWorkingFolder = process.cwd();
|
|
13
14
|
const fileContent = (0, fs_1.readFileSync)(sourceFolder + '/.forceignore');
|
|
14
15
|
const lfiles = fileContent
|
|
15
16
|
.toString()
|
|
16
17
|
.split(/\r?\n/)
|
|
17
18
|
.filter(l => l.trim() !== '' && l.charAt(0) !== '#');
|
|
18
19
|
for (const f of lfiles) {
|
|
19
|
-
|
|
20
|
+
let filepath = '';
|
|
21
|
+
if (sourceFolder && sourceFolder != '.') {
|
|
22
|
+
filepath = path_1.default.join(sourceFolder, f);
|
|
23
|
+
this.files.push(filepath);
|
|
24
|
+
}
|
|
25
|
+
if (currentWorkingFolder != sourceFolder) {
|
|
26
|
+
filepath = path_1.default.join(currentWorkingFolder, f);
|
|
27
|
+
this.files.push(filepath);
|
|
28
|
+
}
|
|
20
29
|
this.files.push(f);
|
|
21
|
-
this.files.push(filepath);
|
|
22
30
|
}
|
|
23
31
|
}
|
|
32
|
+
getCurrentWorkingDirectory() {
|
|
33
|
+
return process.cwd();
|
|
34
|
+
}
|
|
24
35
|
}
|
|
25
36
|
exports.default = IgnoredFiles;
|
|
26
37
|
IgnoredFiles.files = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignored-files.js","sourceRoot":"","sources":["../../../src/shared/lint/ignored-files.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,2CAA0C;AAC1C,2BAAkC;AAClC,wDAAwB;AAExB,MAAqB,YAAY;IAGxB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,YAAoB;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,aAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,IAAA,iBAAY,EAAC,YAAY,GAAG,eAAe,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,WAAW;aACvB,QAAQ,EAAE;aACV,KAAK,CAAC,OAAO,CAAC;aACd,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACvD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;YACtB,
|
|
1
|
+
{"version":3,"file":"ignored-files.js","sourceRoot":"","sources":["../../../src/shared/lint/ignored-files.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,2CAA0C;AAC1C,2BAAkC;AAClC,wDAAwB;AAExB,MAAqB,YAAY;IAGxB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,YAAoB;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,aAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAA,iBAAY,EAAC,YAAY,GAAG,eAAe,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,WAAW;aACvB,QAAQ,EAAE;aACV,KAAK,CAAC,OAAO,CAAC;aACd,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACvD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;YACtB,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,IAAI,YAAY,IAAI,YAAY,IAAI,GAAG,EAAE;gBACvC,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3B;YACD,IAAI,oBAAoB,IAAI,YAAY,EAAE;gBACxC,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;gBAC9C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3B;YAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACpB;IACH,CAAC;IACD,0BAA0B;QACxB,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;IACvB,CAAC;;AA3BH,+BA4BC;AA3Be,kBAAK,GAAG,EAAE,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.3-rc.
|
|
1
|
+
{"version":"2.2.3-rc.6","commands":{"tffa:apexdoc":{"id":"tffa:apexdoc","description":"Generate Apex API Documentation","strict":true,"usage":"<%= command.id %> [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["Generate Apex API Documentation :\t$sfdx tffa:apexdoc "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"d","description":"directory containing package metadata","multiple":false,"default":"."}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"d","description":"directory containing package metadata","default":".","input":[],"multiple":false,"type":"option"}}},"tffa:lint":{"id":"tffa:lint","description":"scan a sfdx project and provide a violations report based on defined standards","strict":true,"usage":"<%= command.id %> [-s <directory>] [-m <integer>] [-p] [-r <filepath>] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["Scan a sfdx project and provide list of code violations :\t$sfdx tffa:scan"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"generate json output","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"minapi":{"name":"minapi","type":"option","char":"m","description":"minimum api version to use during quality checks","multiple":false,"default":53},"pmd":{"name":"pmd","type":"boolean","char":"p","description":"generate pmd output","allowNo":false},"rulesetpath":{"name":"rulesetpath","type":"option","char":"r","description":"path to pmd ruleset","multiple":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"minapi":{"kind":"integer","char":"m","description":"minimum api version to use during quality checks","default":53,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","char":"j","description":"generate json output","allowNo":false,"type":"boolean"},"pmd":{"kind":"boolean","char":"p","description":"generate pmd output","allowNo":false,"type":"boolean"},"rulesetpath":{"kind":"filepath","char":"r","description":"path to pmd ruleset","input":[],"multiple":false,"type":"option"}}},"tffa:meta":{"id":"tffa:meta","description":"scan a sfdx project for metadata","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["scan a sfdx project for metadata :\t$sfdx tffa:meta"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destpath":{"name":"destpath","type":"option","char":"d","description":"full path output file","multiple":false,"default":"."},"clientname":{"name":"clientname","type":"option","char":"c","description":"name of the client","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output format json csv human","helpValue":"(json|csv|human)","multiple":false,"options":["json","csv","human"]},"fields":{"name":"fields","type":"boolean","char":"f","description":"generate field output","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destpath":{"kind":"directory","char":"d","description":"full path output file","default":".","input":[],"multiple":false,"type":"option"},"clientname":{"kind":"directory","char":"c","description":"name of the client","default":".","input":[],"multiple":false,"type":"option"},"output":{"kind":"enum","helpValue":"(json|csv|human)","char":"o","options":["json","csv","human"],"description":"output format json csv human","input":[],"multiple":false,"type":"option"},"fields":{"kind":"boolean","char":"f","description":"generate field output","allowNo":false,"type":"boolean"}}},"tffa:ping":{"id":"tffa:ping","description":"ping","strict":true,"usage":"<%= command.id %> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:ping "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"}},"args":[{"name":"file"}],"flagsConfig":{}}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terafina/tffa-sfdx-plugin",
|
|
3
3
|
"description": "sfdx plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.",
|
|
4
|
-
"version": "2.2.3-rc.
|
|
4
|
+
"version": "2.2.3-rc.6",
|
|
5
5
|
"author": "Terafina Inc",
|
|
6
6
|
"bugs": "https://github.com/terafinainc/tffa-sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"repository": "terafina/tffa-sfdx-plugin",
|
|
106
106
|
"scripts": {
|
|
107
107
|
"lint": "eslint --fix --ext .ts src ",
|
|
108
|
-
"postpack": "
|
|
109
|
-
"prepack": "
|
|
108
|
+
"postpack": "rimraf oclif.manifest.json",
|
|
109
|
+
"prepack": "rimraf lib && tsc -b && oclif manifest && oclif readme",
|
|
110
110
|
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
111
111
|
"version": "oclif readme && git add README.md",
|
|
112
|
-
"publish": "git push --follow-tags origin develop && npm run package && npm publish terafina-tffa-sfdx-plugin-$npm_package_version.tgz",
|
|
113
|
-
"publish_rc": "git push --follow-tags origin develop && npm run package && npm publish --tag next terafina-tffa-sfdx-plugin-$npm_package_version.tgz",
|
|
112
|
+
"publish": "git push --follow-tags origin develop && npm run package && npm publish terafina-tffa-sfdx-plugin-$npm_package_version.tgz && npm dist-tag add @terafina/tffa-sfdx-plugin@$npm_package_version r$npm_config_tffa_version",
|
|
113
|
+
"publish_rc": "git push --follow-tags origin develop && npm run package && npm publish --tag next terafina-tffa-sfdx-plugin-$npm_package_version.tgz && npm dist-tag add @terafina/tffa-sfdx-plugin@$npm_package_version r$npm_config_tffa_version",
|
|
114
114
|
"package": "npm pack ",
|
|
115
115
|
"release": "standard-version --commit-all",
|
|
116
116
|
"release_rc": "npm run release -- --prerelease rc",
|