forked from wearerequired/lint-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
625 lines (590 loc) · 20.2 KB
/
action.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
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
name: Lint Action
author: Samuel Meuli
description: GitHub Action for detecting and fixing linting errors
inputs:
github_token:
description: The GitHub token used to authenticated with GitHub.
required: false
default: ${{ github.token }}
continue_on_error:
description: Whether the workflow run should also fail when linter failures are detected
required: false
default: "true"
auto_fix:
description: Whether linters should try to fix code style issues automatically
required: false
default: "false"
commit:
description: Whether to commit and push the changes made by auto_fix
required: false
default: "true"
git_no_verify:
description: Bypass the pre-commit and pre-push git hooks
required: false
default: "false"
git_name:
description: Username for auto-fix commits
required: false
default: Lint Action
git_email:
description: Email address for auto-fix commits
required: false
default: "[email protected]"
commit_message:
description: 'Template for auto-fix commit messages. The "${linter}" variable can be used to insert the name of the linter which has created the auto-fix'
required: false
default: "Fix code style issues with ${linter}"
check_name:
description: 'Template for the name of the check run. The "${linter}" and "${dir}" variables can be used to insert the name and directory of the linter.'
required: false
default: "${linter}"
neutral_check_on_warning:
description: Whether the check run should conclude with a neutral status instead of success when the linter finds only warnings
required: false
default: "false"
# CSS
stylelint:
description: Enable or disable stylelint checks
required: false
default: "false"
stylelint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
stylelint_dir:
description: Directory where the stylelint command should be run
required: false
stylelint_extensions:
description: Extensions of files to check with stylelint
required: false
default: "css"
stylelint_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
stylelint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
# Go
gofmt:
description: Enable or disable gofmt checks
required: false
default: "false"
gofmt_args:
description: Additional arguments to pass to the linter
required: false
default: ""
gofmt_dir:
description: Directory where the gofmt command should be run
required: false
gofmt_extensions:
description: Extensions of files to check with gofmt
required: false
default: "go"
gofmt_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
gofmt_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
golint:
description: Enable or disable golint checks
required: false
default: "false"
golint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
golint_dir:
description: Directory where the golint command should be run
required: false
golint_extensions:
description: Extensions of files to check with golint
required: false
default: "go"
golint_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
golint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
# JavaScript
eslint:
description: Enable or disable ESLint checks
required: false
default: "false"
eslint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
eslint_dir:
description: Directory where the ESLint command should be run
required: false
eslint_extensions:
description: Extensions of files to check with ESLint
required: false
default: "js"
eslint_command_prefix:
description: Shell command to prepend to the linter command. Will default to `npx --no-install` for NPM and `yarn run --silent` for Yarn.
required: false
default: ""
eslint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
prettier:
description: Enable or disable Prettier checks
required: false
default: "false"
prettier_args:
description: Additional arguments to pass to the linter
required: false
default: ""
prettier_dir:
description: Directory where the Prettier command should be run
required: false
prettier_extensions:
description: Extensions of files to check with Prettier
required: false
default: "css,html,js,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml"
prettier_command_prefix:
description: Shell command to prepend to the linter command. Will default to `npx --no-install` for NPM and `yarn run --silent` for Yarn.
required: false
default: ""
prettier_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
xo:
description: Enable or disable XO checks
required: false
default: "false"
xo_args:
description: Additional arguments to pass to the linter
required: false
default: ""
xo_dir:
description: Directory where the XO command should be run
required: false
xo_extensions:
description: Extensions of files to check with XO
required: false
default: "js"
xo_command_prefix:
description: Shell command to prepend to the linter command. Will default to `npx --no-install` for NPM and `yarn run --silent` for Yarn.
required: false
default: ""
xo_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
# TypeScript
tsc:
description: Enable or disable TypeScript checks
required: false
default: "false"
tsc_args:
description: Additional arguments to pass to the linter
required: false
default: ""
tsc_dir:
description: Directory where the TSC command should be run
required: false
tsc_extensions:
description: Extensions of files to check with TSC
required: false
default: "ts"
tsc_command_prefix:
description: Shell command to prepend to the linter command. Will default to `npx --no-install` for NPM and `yarn run --silent` for Yarn.
required: false
default: ""
tsc_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
# PHP
php_codesniffer:
description: Enable or disable PHP_CodeSniffer checks
required: false
default: "false"
php_codesniffer_args:
description: Additional arguments to pass to the linter
required: false
default: ""
php_codesniffer_dir:
description: Directory where the PHP_CodeSniffer command should be run
required: false
php_codesniffer_extensions:
description: Extensions of files to check with PHP_CodeSniffer
required: false
default: "php"
php_codesniffer_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
php_codesniffer_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
# Python
autopep8:
description: Enable or disable autopep8 checks
required: false
default: "false"
autopep8_args:
description: Additional arguments to pass to the linter
required: false
default: ""
autopep8_dir:
description: Directory where the autopep8 command should be run
required: false
autopep8_extensions:
description: Extensions of files to check with autopep8
required: false
default: "py"
autopep8_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
autopep8_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
black:
description: Enable or disable Black checks
required: false
default: "false"
black_args:
description: Additional arguments to pass to the linter
required: false
default: ""
black_dir:
description: Directory where the Black command should be run
required: false
black_extensions:
description: Extensions of files to check with Black
required: false
default: "py"
black_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
black_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
clang_format:
description: Enable or disable ClangFormat checks
required: false
default: "false"
clang_format_args:
description: Additional arguments to pass to the linter
required: false
default: ""
clang_format_dir:
description: Directory where the ClangFormat command should be run
required: false
clang_format_extensions:
description: Extensions of files to check with ClangFormat
required: false
default: "c,cc,cpp,h,hpp,m,mm"
clang_format_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
clang_format_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
flake8:
description: Enable or disable Flake8 checks
required: false
default: "false"
flake8_args:
description: Additional arguments to pass to the linter
required: false
default: ""
flake8_dir:
description: Directory where the Flake8 command should be run
required: false
flake8_extensions:
description: Extensions of files to check with Flake8
required: false
default: "py"
flake8_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
flake8_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
mypy:
description: Enable or disable Mypy checks
required: false
default: "false"
mypy_args:
description: Additional arguments to pass to the linter
required: false
default: ""
mypy_dir:
description: Directory where the Mypy command should be run
required: false
mypy_extensions:
description: Extensions of files to check with Mypy
required: false
default: "py"
mypy_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
mypy_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
oitnb:
description: Enable or disable oitnb checks
required: false
default: "false"
oitnb_args:
description: Additional arguments to pass to the linter
required: false
default: ""
oitnb_dir:
description: Directory where the oitnb command should be run
required: false
oitnb_extensions:
description: Extensions of files to check with oitnb
required: false
default: "py"
oitnb_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
oitnb_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
pylint:
description: Enable or disable Pylint checks
required: false
default: "false"
pylint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
pylint_dir:
description: Directory where the Pylint command should be run
required: false
pylint_extensions:
description: Extensions of files to check with Pylint
required: false
default: "py"
pylint_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
pylint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
# Ruby
rubocop:
description: Enable or disable RuboCop checks
required: false
default: "false"
rubocop_args:
description: Additional arguments to pass to the linter
required: false
default: ""
rubocop_dir:
description: Directory where the RuboCop command should be run
required: false
rubocop_extensions:
description: Extensions of files to check with RuboCop
required: false
default: "rb"
rubocop_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
rubocop_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
erblint:
description: Enable or disable ERB Lint checks
required: false
default: "false"
erblint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
erblint_dir:
description: Directory where the ERB Lint command should be run
required: false
erblint_extensions:
description: Extensions of files to check with ERB Lint
required: false
default: "erb"
erblint_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
erblint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "false"
# Rust
clippy:
description: Enable or disable clippy
required: false
default: "false"
clippy_args:
description: Additional arguments to pass to the linter
required: false
default: ""
clippy_dir:
description: Directory where the RuboCop command should be run
required: false
clippy_extensions:
description: Extensions of files to check with RuboCop
required: false
default: "rs"
clippy_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
clippy_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
# Swift
# Alias of `swift_format_lockwood` (for backward compatibility)
# TODO: Remove alias in v2
swiftformat:
description: Enable or disable SwiftFormat checks
required: false
default: "false"
swiftformat_args:
description: Additional arguments to pass to the linter
required: false
default: ""
swiftformat_dir:
description: Directory where the SwiftFormat command should be run
required: false
swiftformat_extensions:
description: Extensions of files to check with SwiftFormat
required: false
default: "swift"
swiftformat_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
swiftformat_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
swift_format_lockwood:
description: Enable or disable SwiftFormat checks
required: false
default: "false"
swift_format_lockwood_args:
description: Additional arguments to pass to the linter
required: false
default: ""
swift_format_lockwood_dir:
description: Directory where the SwiftFormat command should be run
required: false
swift_format_lockwood_extensions:
description: Extensions of files to check with SwiftFormat
required: false
default: "swift"
swift_format_lockwood_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
swift_format_lockwood_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
swift_format_official:
description: Enable or disable swift-format checks
required: false
default: "false"
swift_format_official_args:
description: Additional arguments to pass to the linter
required: false
default: ""
swift_format_official_dir:
description: Directory where the swift-format command should be run
required: false
swift_format_official_extensions:
description: Extrensions of files to check with swift-format
required: false
default: "swift"
swift_format_official_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
swift_format_official_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
swiftlint:
description: Enable or disable SwiftLint checks
required: false
default: "false"
swiftlint_args:
description: Additional arguments to pass to the linter
required: false
default: ""
swiftlint_dir:
description: Directory where the SwiftLint command should be run
required: false
swiftlint_extensions:
description: Extensions of files to check with SwiftLint
required: false
default: "swift"
swiftlint_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
swiftlint_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
dotnet_format:
description: Enable or disable dotnet-format checks
required: false
default: "false"
dotnet_format_args:
description: Additional arguments to pass to the linter
required: false
default: ""
dotnet_format_dir:
description: Directory where the dotnet-format command should be run
required: false
dotnet_format_extensions:
description: Extensions of files to check with dotnet-format
required: false
default: "cs"
dotnet_format_command_prefix:
description: Shell command to prepend to the linter command
required: false
default: ""
dotnet_format_auto_fix:
description: Whether this linter should try to fix code style issues automatically. If set to `true`, it will only work if "auto_fix" is set to `true` as well
required: false
default: "true"
runs:
using: node16
main: ./dist/index.js
branding:
icon: check
color: green