Repository navigation
Expand file tree
/
Copy pathconfig.yml
More file actions
5303 lines (4803 loc) · 154 KB
/
Copy pathconfig.yml
File metadata and controls
5303 lines (4803 loc) · 154 KB
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
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Diagnostic IDs follow the order below in the serialized format.
# Messages use {format} for substitutions in argument order.
# Supported formats are slice, byte, hex, hex2 (zero-padded hex byte), and line.
errors:
- name: ALIAS_ARGUMENT
message: "invalid argument being passed to `alias`; expected a bare word, symbol, constant, or global variable"
- name: ALIAS_ARGUMENT_NUMBERED_REFERENCE
message: "invalid argument being passed to `alias`; can't make alias for the number variables"
- name: AMPAMPEQ_MULTI_ASSIGN
message: "unexpected `&&=` in a multiple assignment"
- name: ARGUMENT_AFTER_BLOCK
message: "unexpected argument after a block argument"
- name: ARGUMENT_AFTER_FORWARDING_ELLIPSES
message: "unexpected argument after `...`"
- name: ARGUMENT_BARE_HASH
message: "unexpected bare hash argument"
- name: ARGUMENT_BLOCK_MULTI
message: "both block arg and actual block given; only one block is allowed"
- name: ARGUMENT_CONFLICT_AMPERSAND
message: "unexpected `&`; anonymous block parameter is also used within block"
- name: ARGUMENT_CONFLICT_STAR
message: "unexpected `*`; anonymous rest parameter is also used within block"
- name: ARGUMENT_CONFLICT_STAR_STAR
message: "unexpected `**`; anonymous keyword rest parameter is also used within block"
- name: ARGUMENT_FORMAL_CLASS
message: "invalid formal argument; formal argument cannot be a class variable"
- name: ARGUMENT_FORMAL_CONSTANT
message: "invalid formal argument; formal argument cannot be a constant"
- name: ARGUMENT_FORMAL_GLOBAL
message: "invalid formal argument; formal argument cannot be a global variable"
- name: ARGUMENT_FORMAL_IVAR
message: "invalid formal argument; formal argument cannot be an instance variable"
- name: ARGUMENT_FORWARDING_UNBOUND
message: "unexpected `...` in an non-parenthesized call"
- name: ARGUMENT_NO_FORWARDING_AMPERSAND
message: "unexpected `&`; no anonymous block parameter"
- name: ARGUMENT_NO_FORWARDING_ELLIPSES
message: "unexpected ... when the parent method is not forwarding"
- name: ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA
message: "unexpected ... in lambda argument"
- name: ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK
message: "unexpected ... in block argument"
- name: ARGUMENT_NO_FORWARDING_STAR
message: "unexpected `*`; no anonymous rest parameter"
- name: ARGUMENT_NO_FORWARDING_STAR_STAR
message: "unexpected `**`; no anonymous keyword rest parameter"
- name: ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT
message: "unexpected `*` splat argument after a `**` keyword splat argument"
- name: ARGUMENT_SPLAT_AFTER_SPLAT
message: "unexpected `*` splat argument after a `*` splat argument"
- name: ARGUMENT_TERM_PAREN
message: "unexpected {slice}; expected a `)` to close the arguments"
- name: ARGUMENT_UNEXPECTED_BLOCK
message: "unexpected '{' after a method call without parenthesis"
- name: ARRAY_ELEMENT
message: "expected an element for the array"
- name: ARRAY_EXPRESSION
message: "expected an expression for the array element"
- name: ARRAY_EXPRESSION_AFTER_STAR
message: "expected an expression after `*` in the array"
- name: ARRAY_SEPARATOR
message: "unexpected {slice}; expected a `,` separator for the array elements"
- name: ARRAY_TERM
message: "unexpected {slice}; expected a `]` to close the array"
- name: BEGIN_LONELY_ELSE
message: "unexpected `else` in `begin` block; else without rescue is useless"
- name: BEGIN_TERM
message: "expected an `end` to close the `begin` statement"
- name: BEGIN_UPCASE_BRACE
message: "expected a `{` after `BEGIN`"
- name: BEGIN_UPCASE_TERM
message: "expected a `}` to close the `BEGIN` statement"
- name: BEGIN_UPCASE_TOPLEVEL
message: "BEGIN is permitted only at toplevel"
- name: BLOCK_PARAM_LOCAL_VARIABLE
message: "expected a local variable name in the block parameters"
- name: BLOCK_PARAM_PIPE_TERM
message: "expected the block parameters to end with `|`"
- name: BLOCK_TERM_BRACE
message: "expected a block beginning with `{` to end with `}`"
- name: BLOCK_TERM_END
message: "expected a block beginning with `do` to end with `end`"
- name: CANNOT_PARSE_EXPRESSION
message: "cannot parse the expression"
- name: CANNOT_PARSE_STRING_PART
message: "cannot parse the string part"
- name: CASE_EXPRESSION_AFTER_CASE
message: "expected an expression after `case`"
- name: CASE_EXPRESSION_AFTER_WHEN
message: "expected an expression after `when`"
- name: CASE_MATCH_MISSING_PREDICATE
message: "expected a predicate for a case matching statement"
- name: CASE_MISSING_CONDITIONS
message: "expected a `when` or `in` clause after `case`"
- name: CASE_TERM
message: "expected an `end` to close the `case` statement"
- name: CLASS_IN_METHOD
message: "unexpected class definition in method body"
- name: CLASS_NAME
message: "unexpected constant path after `class`; class/module name must be CONSTANT"
- name: CLASS_SUPERCLASS
message: "expected a superclass after `<`"
- name: CLASS_TERM
message: "expected an `end` to close the `class` statement"
- name: CLASS_UNEXPECTED_END
message: "unexpected `end`, expecting ';' or '\\n'"
- name: CLASS_VARIABLE_BARE
message: "'@@' without identifiers is not allowed as a class variable name"
- name: CONDITIONAL_ELSIF_PREDICATE
message: "expected a predicate expression for the `elsif` statement"
- name: CONDITIONAL_IF_PREDICATE
message: "expected a predicate expression for the `if` statement"
- name: CONDITIONAL_PREDICATE_TERM
message: "expected `then` or `;` or '\\n'"
- name: CONDITIONAL_TERM
message: "expected an `end` to close the conditional clause"
- name: CONDITIONAL_TERM_ELSE
message: "expected an `end` to close the `else` clause"
- name: CONDITIONAL_UNLESS_PREDICATE
message: "expected a predicate expression for the `unless` statement"
- name: CONDITIONAL_UNTIL_PREDICATE
message: "expected a predicate expression for the `until` statement"
- name: CONDITIONAL_WHILE_PREDICATE
message: "expected a predicate expression for the `while` statement"
- name: CONSTANT_PATH_COLON_COLON_CONSTANT
message: "expected a constant after the `::` operator"
- name: DEF_ENDLESS
message: "could not parse the endless method body"
- name: DEF_ENDLESS_PARAMETERS
message: "could not parse the endless method parameters"
- name: DEF_ENDLESS_SETTER
message: "invalid method name; a setter method cannot be defined in an endless method definition"
- name: DEF_ENDLESS_DO_BLOCK
message: "unexpected `do` for block in an endless method definition"
- name: DEF_NAME
message: "unexpected {slice}; expected a method name"
- name: DEF_PARAMS_TERM
message: "expected a delimiter to close the parameters"
- name: DEF_PARAMS_TERM_PAREN
message: "unexpected {slice}; expected a `)` to close the parameters"
- name: DEF_RECEIVER
message: "expected a receiver for the method definition"
- name: DEF_RECEIVER_SETTER
message: "setter method name cannot be used as a receiver in a method definition"
- name: DEF_RECEIVER_TERM
message: "expected a `.` or `::` after the receiver in a method definition"
- name: DEF_TERM
message: "expected an `end` to close the `def` statement"
- name: DEFINED_EXPRESSION
message: "expected an expression after `defined?`"
- name: EMBDOC_TERM
message: "embedded document meets end of file"
- name: EMBEXPR_END
message: "expected a `}` to close the embedded expression"
- name: EMBVAR_INVALID
message: "invalid embedded variable"
- name: END_UPCASE_BRACE
message: "expected a `{` after `END`"
- name: END_UPCASE_TERM
message: "expected a `}` to close the `END` statement"
- name: ESCAPE_INVALID_CONTROL
message: "Invalid escape character syntax"
- name: ESCAPE_INVALID_CONTROL_REPEAT
message: "invalid control escape sequence; control cannot be repeated"
- name: ESCAPE_INVALID_HEXADECIMAL
message: "invalid hex escape sequence"
- name: ESCAPE_INVALID_META
message: "Invalid escape character syntax"
- name: ESCAPE_INVALID_META_REPEAT
message: "invalid meta escape sequence; meta cannot be repeated"
- name: ESCAPE_INVALID_UNICODE
message: "invalid Unicode escape sequence"
- name: ESCAPE_INVALID_UNICODE_CM_FLAGS
message: "invalid Unicode escape sequence; Unicode cannot be combined with control or meta flags"
- name: ESCAPE_INVALID_UNICODE_LIST
message: "invalid Unicode list: {slice}"
- name: ESCAPE_INVALID_UNICODE_LITERAL
message: "invalid Unicode escape sequence; Multiple codepoints at single character literal are disallowed"
- name: ESCAPE_INVALID_UNICODE_LONG
message: "invalid Unicode escape sequence; maximum length is 6 digits"
- name: ESCAPE_INVALID_UNICODE_SHORT
message: "too short escape sequence: {slice}"
- name: ESCAPE_INVALID_UNICODE_TERM
message: "unterminated Unicode escape"
- name: EXPECT_ARGUMENT
message: "unexpected {slice}; expected an argument"
- name: EXPECT_EOL_AFTER_STATEMENT
message: "unexpected {slice}, expecting end-of-input"
- name: EXPECT_EXPRESSION_AFTER_AMPAMPEQ
message: "expected an expression after `&&=`"
- name: EXPECT_EXPRESSION_AFTER_COMMA
message: "expected an expression after `,`"
- name: EXPECT_EXPRESSION_AFTER_EQUAL
message: "expected an expression after `=`"
- name: EXPECT_EXPRESSION_AFTER_LESS_LESS
message: "expected an expression after `<<`"
- name: EXPECT_EXPRESSION_AFTER_LPAREN
message: "expected an expression after `(`"
- name: EXPECT_EXPRESSION_AFTER_OPERATOR
message: "unexpected {slice}; expected an expression after the operator"
- name: EXPECT_EXPRESSION_AFTER_PIPEPIPEEQ
message: "expected an expression after `||=`"
- name: EXPECT_EXPRESSION_AFTER_SPLAT
message: "expected an expression after `*` splat in an argument"
- name: EXPECT_EXPRESSION_AFTER_SPLAT_HASH
message: "expected an expression after `**` in a hash"
- name: EXPECT_EXPRESSION_AFTER_STAR
message: "expected an expression after `*`"
- name: EXPECT_FOR_DELIMITER
message: "unexpected {slice}; expected a 'do', newline, or ';' after the 'for' loop collection"
- name: EXPECT_IDENT_REQ_PARAMETER
message: "expected an identifier for the required parameter"
- name: EXPECT_IN_DELIMITER
message: "expected a delimiter after the patterns of an `in` clause"
- name: EXPECT_LPAREN_AFTER_NOT_LPAREN
message: "expected a `(` immediately after `not`"
- name: EXPECT_LPAREN_AFTER_NOT_OTHER
message: "expected a `(` after `not`"
- name: EXPECT_LPAREN_REQ_PARAMETER
message: "expected a `(` to start a required parameter"
- name: EXPECT_MESSAGE
message: "unexpected {slice}; expecting a message to send to the receiver"
- name: EXPECT_RBRACKET
message: "expected a matching `]`"
- name: EXPECT_RPAREN
message: "expected a matching `)`"
- name: EXPECT_RPAREN_AFTER_MULTI
message: "expected a `)` after multiple assignment"
- name: EXPECT_RPAREN_REQ_PARAMETER
message: "expected a `)` to end a required parameter"
- name: EXPECT_SINGLETON_CLASS_DELIMITER
message: "unexpected {slice}; expected a newline or a ';' after the singleton class"
- name: EXPECT_STRING_CONTENT
message: "expected string content after opening string delimiter"
- name: EXPECT_WHEN_DELIMITER
message: "expected a delimiter after the predicates of a `when` clause"
- name: EXPRESSION_BARE_HASH
message: "unexpected bare hash in expression"
- name: EXPRESSION_NOT_WRITABLE
message: "unexpected '='; target cannot be written"
- name: EXPRESSION_NOT_WRITABLE_ENCODING
message: "Can't assign to __ENCODING__"
- name: EXPRESSION_NOT_WRITABLE_FALSE
message: "Can't assign to false"
- name: EXPRESSION_NOT_WRITABLE_FILE
message: "Can't assign to __FILE__"
- name: EXPRESSION_NOT_WRITABLE_LINE
message: "Can't assign to __LINE__"
- name: EXPRESSION_NOT_WRITABLE_NIL
message: "Can't assign to nil"
- name: EXPRESSION_NOT_WRITABLE_NUMBERED
message: "Can't assign to numbered parameter {slice}"
- name: EXPRESSION_NOT_WRITABLE_SELF
message: "Can't change the value of self"
- name: EXPRESSION_NOT_WRITABLE_TRUE
message: "Can't assign to true"
- name: FOR_COLLECTION
message: "expected a collection after the `in` in a `for` statement"
- name: FOR_IN
message: "expected an `in` after the index in a `for` statement"
- name: FOR_INDEX
message: "expected an index after `for`"
- name: FOR_TERM
message: "expected an `end` to close the `for` loop"
- name: GLOBAL_VARIABLE_BARE
message: "'$' without identifiers is not allowed as a global variable name"
- name: HASH_EXPRESSION_AFTER_LABEL
message: "expected an expression after the label in a hash"
- name: HASH_KEY
message: "unexpected {slice}, expecting '}' or a key in the hash literal"
- name: HASH_ROCKET
message: "expected a `=>` between the hash key and value"
- name: HASH_TERM
message: "expected a `}` to close the hash literal"
- name: HASH_VALUE
message: "unexpected {slice}; expected a value in the hash literal"
- name: HEREDOC_IDENTIFIER
message: "unterminated here document identifier"
- name: HEREDOC_TERM
message: "unterminated heredoc; can't find string \"{slice}\" anywhere before EOF"
- name: INCOMPLETE_QUESTION_MARK
message: "incomplete expression at `?`"
- name: INCOMPLETE_VARIABLE_CLASS
message: "'{slice}' is not allowed as a class variable name"
- name: INCOMPLETE_VARIABLE_CLASS_3_3
message: "`{slice}' is not allowed as a class variable name"
- name: INCOMPLETE_VARIABLE_INSTANCE
message: "'{slice}' is not allowed as an instance variable name"
- name: INCOMPLETE_VARIABLE_INSTANCE_3_3
message: "`{slice}' is not allowed as an instance variable name"
- name: INSTANCE_VARIABLE_BARE
message: "'@' without identifiers is not allowed as an instance variable name"
- name: INVALID_BLOCK_EXIT
message: "Invalid {slice}"
- name: INVALID_CHARACTER
message: "Invalid char '\\x{hex2}' in expression"
- name: INVALID_COMMA
message: "invalid comma"
- name: INVALID_ENCODING_MAGIC_COMMENT
level: argument
message: "unknown or invalid encoding in the magic comment"
- name: INVALID_ESCAPE_CHARACTER
message: "Invalid escape character syntax"
- name: INVALID_FLOAT_EXPONENT
message: "invalid exponent"
- name: INVALID_CONSTANT_READ
message: "invalid constant name {slice}"
- name: INVALID_LOCAL_VARIABLE_READ
message: "identifier {slice} is not valid to get"
- name: INVALID_LOCAL_VARIABLE_WRITE
message: "identifier {slice} is not valid to set"
- name: INVALID_MULTIBYTE_CHAR
message: "invalid multibyte char ({slice})"
- name: INVALID_MULTIBYTE_CHARACTER
message: "invalid multibyte character 0x{hex}"
- name: INVALID_MULTIBYTE_ESCAPE
message: "invalid multibyte escape: /{slice}/{slice}"
- name: INVALID_NUMBER_BINARY
message: "invalid binary number; numeric literal without digits"
- name: INVALID_NUMBER_DECIMAL
message: "invalid decimal number; numeric literal without digits"
- name: INVALID_NUMBER_FRACTION
message: "unexpected fraction part after numeric literal"
- name: INVALID_NUMBER_HEXADECIMAL
message: "invalid hexadecimal number; numeric literal without digits"
- name: INVALID_NUMBER_OCTAL
message: "invalid octal number; numeric literal without digits"
- name: INVALID_NUMBER_UNDERSCORE_INNER
message: "invalid underscore placement in number"
- name: INVALID_NUMBER_UNDERSCORE_TRAILING
message: "trailing '_' in number"
- name: INVALID_PERCENT
message: "unknown type of %string"
- name: INVALID_PERCENT_EOF
message: "unterminated quoted string meets end of file"
- name: INVALID_PRINTABLE_CHARACTER
message: "invalid character `{byte}`"
- name: INVALID_RETRY_AFTER_ELSE
message: "Invalid retry after else"
- name: INVALID_RETRY_AFTER_ENSURE
message: "Invalid retry after ensure"
- name: INVALID_RETRY_WITHOUT_RESCUE
message: "Invalid retry without rescue"
- name: INVALID_SYMBOL
message: "invalid symbol"
- name: INVALID_VARIABLE_GLOBAL
message: "'{slice}' is not allowed as a global variable name"
- name: INVALID_VARIABLE_GLOBAL_3_3
message: "`{slice}' is not allowed as a global variable name"
- name: INVALID_YIELD
message: "Invalid yield"
- name: IT_NOT_ALLOWED_NUMBERED
message: "'it' is not allowed when a numbered parameter is already used"
- name: IT_NOT_ALLOWED_ORDINARY
message: "'it' is not allowed when an ordinary parameter is defined"
- name: LAMBDA_OPEN
message: "expected a `do` keyword or a `{` to open the lambda block"
- name: LAMBDA_TERM_BRACE
message: "expected a lambda block beginning with `{` to end with `}`"
- name: LAMBDA_TERM_END
message: "expected a lambda block beginning with `do` to end with `end`"
- name: LIST_I_LOWER_ELEMENT
message: "expected a symbol in a `%i` list"
- name: LIST_I_LOWER_TERM
message: "unterminated list; expected a closing delimiter for the `%i`"
- name: LIST_I_UPPER_ELEMENT
message: "expected a symbol in a `%I` list"
- name: LIST_I_UPPER_TERM
message: "unterminated list; expected a closing delimiter for the `%I`"
- name: LIST_W_LOWER_ELEMENT
message: "expected a string in a `%w` list"
- name: LIST_W_LOWER_TERM
message: "unterminated list; expected a closing delimiter for the `%w`"
- name: LIST_W_UPPER_ELEMENT
message: "expected a string in a `%W` list"
- name: LIST_W_UPPER_TERM
message: "unterminated list; expected a closing delimiter for the `%W`"
- name: MALLOC_FAILED
message: "failed to allocate memory"
- name: MIXED_ENCODING
message: "UTF-8 mixed within {slice} source"
- name: MODULE_IN_METHOD
message: "unexpected module definition in method body"
- name: MODULE_NAME
message: "unexpected constant path after `module`; class/module name must be CONSTANT"
- name: MODULE_TERM
message: "expected an `end` to close the `module` statement"
- name: MULTI_ASSIGN_MULTI_SPLATS
message: "multiple splats in multiple assignment"
- name: MULTI_ASSIGN_UNEXPECTED_REST
message: "unexpected '{slice}' resulting in multiple splats in multiple assignment"
- name: NESTING_TOO_DEEP
message: "nesting too deep"
- name: NO_LOCAL_VARIABLE
message: "{slice}: no such local variable"
- name: NON_ASSOCIATIVE_OPERATOR
message: "unexpected {slice}; {slice} is a non-associative operator"
- name: NOT_EXPRESSION
message: "expected an expression after `not`"
- name: NUMBER_LITERAL_UNDERSCORE
message: "number literal ending with a `_`"
- name: NUMBERED_PARAMETER_INNER_BLOCK
message: "numbered parameter is already used in inner block"
- name: NUMBERED_PARAMETER_IT
message: "numbered parameters are not allowed when 'it' is already used"
- name: NUMBERED_PARAMETER_ORDINARY
message: "numbered parameters are not allowed when an ordinary parameter is defined"
- name: NUMBERED_PARAMETER_OUTER_BLOCK
message: "numbered parameter is already used in outer block"
- name: OPERATOR_MULTI_ASSIGN
message: "unexpected operator for a multiple assignment"
- name: OPERATOR_WRITE_ARGUMENTS
message: "unexpected operator after a call with arguments"
- name: OPERATOR_WRITE_BLOCK
message: "unexpected operator after a call with a block"
- name: PARAMETER_ASSOC_SPLAT_MULTI
message: "unexpected multiple `**` splat parameters"
- name: PARAMETER_BLOCK_MULTI
message: "multiple block parameters; only one block is allowed"
- name: PARAMETER_CIRCULAR
message: "circular argument reference - {slice}"
- name: PARAMETER_FORWARDING_AFTER_REST
message: "... after rest argument"
- name: PARAMETER_METHOD_NAME
message: "unexpected name for a parameter"
- name: PARAMETER_NAME_DUPLICATED
message: "duplicated argument name"
- name: PARAMETER_NO_DEFAULT
message: "expected a default value for the parameter"
- name: PARAMETER_NO_DEFAULT_KW
message: "expected a default value for the keyword parameter"
- name: PARAMETER_NUMBERED_RESERVED
message: "{slice} is reserved for numbered parameters"
- name: PARAMETER_ORDER
message: "unexpected parameter order"
- name: PARAMETER_SPLAT_MULTI
message: "unexpected multiple `*` splat parameters"
- name: PARAMETER_STAR
message: "unexpected parameter `*`"
- name: PARAMETER_UNEXPECTED_FWD
message: "unexpected `...` in parameters"
- name: PARAMETER_UNEXPECTED_NO_KW
message: "unexpected **nil; no keywords marker disallowed after keywords"
- name: PARAMETER_WILD_LOOSE_COMMA
message: "unexpected `,` in parameters"
- name: PATTERN_ARRAY_MULTIPLE_RESTS
message: "unexpected multiple '*' rest patterns in an array pattern"
- name: PATTERN_CAPTURE_DUPLICATE
message: "duplicated variable name"
- name: PATTERN_CAPTURE_IN_ALTERNATIVE
message: "variable capture in alternative pattern"
- name: PATTERN_EXPRESSION_AFTER_BRACKET
message: "expected a pattern expression after the `[` operator"
- name: PATTERN_EXPRESSION_AFTER_COMMA
message: "expected a pattern expression after `,`"
- name: PATTERN_EXPRESSION_AFTER_HROCKET
message: "expected a pattern expression after `=>`"
- name: PATTERN_EXPRESSION_AFTER_IN
message: "expected a pattern expression after the `in` keyword"
- name: PATTERN_EXPRESSION_AFTER_KEY
message: "expected a pattern expression after the key"
- name: PATTERN_EXPRESSION_AFTER_PAREN
message: "expected a pattern expression after the `(` operator"
- name: PATTERN_EXPRESSION_AFTER_PIN
message: "expected a pattern expression after the `^` pin operator"
- name: PATTERN_EXPRESSION_AFTER_PIPE
message: "expected a pattern expression after the `|` operator"
- name: PATTERN_EXPRESSION_AFTER_RANGE
message: "expected a pattern expression after the range operator"
- name: PATTERN_EXPRESSION_AFTER_REST
message: "unexpected pattern expression after the `**` expression"
- name: PATTERN_FIND_MISSING_INNER
message: "find patterns need at least one required inner pattern"
- name: PATTERN_HASH_IMPLICIT
message: "unexpected implicit hash in pattern; use '{' to delineate"
- name: PATTERN_HASH_KEY
message: "unexpected {slice}; expected a key in the hash pattern"
- name: PATTERN_HASH_KEY_DUPLICATE
message: "duplicated key name"
- name: PATTERN_HASH_KEY_INTERPOLATED
message: "symbol literal with interpolation is not allowed"
- name: PATTERN_HASH_KEY_LABEL
message: "expected a label as the key in the hash pattern"
- name: PATTERN_HASH_KEY_LOCALS
message: "key must be valid as local variables"
- name: PATTERN_IDENT_AFTER_HROCKET
message: "expected an identifier after the `=>` operator"
- name: PATTERN_LABEL_AFTER_COMMA
message: "expected a label after the `,` in the hash pattern"
- name: PATTERN_REST
message: "unexpected rest pattern"
- name: PATTERN_TERM_BRACE
message: "expected a `}` to close the pattern expression"
- name: PATTERN_TERM_BRACKET
message: "expected a `]` to close the pattern expression"
- name: PATTERN_TERM_PAREN
message: "expected a `)` to close the pattern expression"
- name: PIPEPIPEEQ_MULTI_ASSIGN
message: "unexpected `||=` in a multiple assignment"
- name: REGEXP_ENCODING_OPTION_MISMATCH
message: "regexp encoding option '{byte}' differs from source encoding '{slice}'"
- name: REGEXP_ESCAPED_NON_ASCII_IN_UTF8
message: "escaped non ASCII character in UTF-8 regexp: /{slice}/{slice}"
- name: REGEXP_INCOMPAT_CHAR_ENCODING
message: "incompatible character encoding: /{slice}/{slice}"
- name: REGEXP_INVALID_CHAR_PROPERTY
message: "invalid character property name {{slice}}: /{slice}/{slice}"
- name: REGEXP_INVALID_UNICODE_RANGE
message: "invalid Unicode range: /{slice}/{slice}"
- name: REGEXP_NON_ESCAPED_MBC
message: "/.../n has a non escaped non ASCII character in non ASCII-8BIT script: /{slice}/{slice}"
- name: REGEXP_PARSE_ERROR
message: "{slice}"
- name: REGEXP_INTERPOLATION_ENCODING
level: encoding_compatibility
message: "incompatible character encodings: {slice} and {slice}"
- name: REGEXP_TERM
message: "unterminated regexp meets end of file; expected a closing delimiter"
- name: REGEXP_UNKNOWN_OPTIONS
message: "unknown regexp {slice} - {slice}"
- name: REGEXP_UTF8_CHAR_NON_UTF8_REGEXP
message: "UTF-8 character in non UTF-8 regexp: /{slice}/{slice}"
- name: RESCUE_EXPRESSION
message: "expected a rescued expression"
- name: RESCUE_MODIFIER_VALUE
message: "expected a value after the `rescue` modifier"
- name: RESCUE_TERM
message: "expected a closing delimiter for the `rescue` clause"
- name: RESCUE_VARIABLE
message: "expected an exception variable after `=>` in a rescue statement"
- name: RETURN_INVALID
message: "Invalid return in class/module body"
- name: SCRIPT_NOT_FOUND
level: load
message: "no Ruby script found in input"
- name: SINGLETON_FOR_LITERALS
message: "cannot define singleton method for literals"
- name: STACK_EXHAUSTED
level: stack
message: "stack level too deep"
- name: STATEMENT_ALIAS
message: "unexpected an `alias` at a non-statement position"
- name: STATEMENT_POSTEXE_END
message: "unexpected an `END` at a non-statement position"
- name: STATEMENT_PREEXE_BEGIN
message: "unexpected a `BEGIN` at a non-statement position"
- name: STATEMENT_UNDEF
message: "unexpected an `undef` at a non-statement position"
- name: STRING_CONCATENATION
message: "expected a string for concatenation"
- name: STRING_CONCATENATION_ENCODING
message: "string literal encodings differ ({slice} / {slice})"
- name: STRING_INTERPOLATED_TERM
message: "unterminated string; expected a closing delimiter for the interpolated string"
- name: STRING_LITERAL_EOF
message: "unterminated string meets end of file"
- name: STRING_LITERAL_TERM
message: "unexpected {slice}, expected a string literal terminator"
- name: SYMBOL_INVALID
message: "invalid symbol"
- name: SYMBOL_TERM_DYNAMIC
message: "unterminated quoted string; expected a closing delimiter for the dynamic symbol"
- name: SYMBOL_TERM_INTERPOLATED
message: "unterminated symbol; expected a closing delimiter for the interpolated symbol"
- name: TERNARY_COLON
message: "expected a `:` after the true expression of a ternary operator"
- name: TERNARY_EXPRESSION_FALSE
message: "expected an expression after `:` in the ternary operator"
- name: TERNARY_EXPRESSION_TRUE
message: "expected an expression after `?` in the ternary operator"
- name: UNARY_DISALLOWED
message: "unexpected {slice}; unary calls are not allowed in this context"
- name: UNARY_RECEIVER
message: "unexpected {slice}, expected a receiver for unary `{byte}`"
- name: UNDEF_ARGUMENT
message: "invalid argument being passed to `undef`; expected a bare word, constant, or symbol argument"
- name: UNEXPECTED_BLOCK_ARGUMENT
message: "block argument should not be given"
- name: UNEXPECTED_INDEX_BLOCK
message: "unexpected block arg given in index assignment; blocks are not allowed in index assignment expressions"
- name: UNEXPECTED_INDEX_KEYWORDS
message: "unexpected keyword arg given in index assignment; keywords are not allowed in index assignment expressions"
- name: UNEXPECTED_LABEL
message: "unexpected label"
- name: UNEXPECTED_MULTI_WRITE
message: "unexpected multiple assignment; multiple assignment is not allowed in this context"
- name: UNEXPECTED_PARAMETER_DEFAULT_VALUE
message: "unexpected {slice}; expected a default value for a parameter"
- name: UNEXPECTED_RANGE_OPERATOR
message: "unexpected range operator; .. and ... are non-associative and cannot be chained"
- name: UNEXPECTED_SAFE_NAVIGATION
message: "&. inside multiple assignment destination"
- name: UNEXPECTED_TOKEN_CLOSE_CONTEXT
message: "unexpected {slice}, assuming it is closing the parent {slice}"
- name: UNEXPECTED_TOKEN_IGNORE
message: "unexpected {slice}, ignoring it"
- name: UNTIL_TERM
message: "expected an `end` to close the `until` statement"
- name: VOID_EXPRESSION
message: "unexpected void value expression"
- name: WHILE_TERM
message: "expected an `end` to close the `while` statement"
- name: WRITE_TARGET_IN_METHOD
message: "dynamic constant assignment"
- name: WRITE_TARGET_READONLY
message: "Can't set variable {slice}"
- name: WRITE_TARGET_UNEXPECTED
message: "unexpected write target"
- name: XSTRING_TERM
message: "expected a closing delimiter for the `%x` or backtick string"
warnings:
- name: AMBIGUOUS_BINARY_OPERATOR
level: verbose
message: "'{slice}' after local variable or literal is interpreted as binary operator even though it seems like {slice}"
- name: AMBIGUOUS_FIRST_ARGUMENT_MINUS
level: verbose
message: "ambiguous first argument; put parentheses or a space even after `-` operator"
- name: AMBIGUOUS_FIRST_ARGUMENT_PLUS
level: verbose
message: "ambiguous first argument; put parentheses or a space even after `+` operator"
- name: AMBIGUOUS_PREFIX_AMPERSAND
level: verbose
message: "ambiguous `&` has been interpreted as an argument prefix"
- name: AMBIGUOUS_PREFIX_STAR
level: verbose
message: "ambiguous `*` has been interpreted as an argument prefix"
- name: AMBIGUOUS_PREFIX_STAR_STAR
level: verbose
message: "ambiguous `**` has been interpreted as an argument prefix"
- name: AMBIGUOUS_SLASH
level: verbose
message: "ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator"
- name: COMPARISON_AFTER_COMPARISON
level: verbose
message: "comparison '{slice}' after comparison"
- name: DOT_DOT_DOT_EOL
level: default
message: "... at EOL, should be parenthesized?"
- name: EQUAL_IN_CONDITIONAL
level: default
message: "found '= literal' in conditional, should be =="
- name: EQUAL_IN_CONDITIONAL_3_3
level: default
message: "found `= literal' in conditional, should be =="
- name: END_IN_METHOD
level: default
message: "END in method; use at_exit"
- name: DUPLICATED_HASH_KEY
level: default
message: "key {slice} is duplicated and overwritten on line {line}"
- name: DUPLICATED_WHEN_CLAUSE
level: verbose
message: "'when' clause on line {line} duplicates 'when' clause on line {line} and is ignored"
- name: FLOAT_OUT_OF_RANGE
level: verbose
message: "Float {slice}{slice} out of range"
- name: IGNORED_FROZEN_STRING_LITERAL
level: verbose
message: "'frozen_string_literal' is ignored after any tokens"
- name: INDENTATION_MISMATCH
level: verbose
message: "mismatched indentations at '{slice}' with '{slice}' at {line}"
- name: INTEGER_IN_FLIP_FLOP
level: default
message: "integer literal in flip-flop"
- name: INVALID_CHARACTER
level: default
message: "invalid character syntax; use {slice}"
- name: INVALID_MAGIC_COMMENT_VALUE
level: verbose
message: "invalid value for {slice}: {slice}"
- name: INVALID_NUMBERED_REFERENCE
level: default
message: "'{slice}' is too big for a number variable, always nil"
- name: KEYWORD_EOL
level: verbose
message: "`{slice}` at the end of line without an expression"
- name: LITERAL_IN_CONDITION_DEFAULT
level: default
message: "{slice}literal in {slice}"
- name: LITERAL_IN_CONDITION_VERBOSE
level: verbose
message: "{slice}literal in {slice}"
- name: SHAREABLE_CONSTANT_VALUE_LINE
level: verbose
message: "'shareable_constant_value' is ignored unless in comment-only line"
- name: SHEBANG_CARRIAGE_RETURN
level: default
message: "shebang line ending with \\r may cause problems"
- name: UNEXPECTED_CARRIAGE_RETURN
level: default
message: "encountered \\r in middle of line, treated as a mere space"
- name: UNREACHABLE_STATEMENT
level: verbose
message: "statement not reached"
- name: UNUSED_LOCAL_VARIABLE
level: verbose
message: "assigned but unused variable - {slice}"
- name: VOID_STATEMENT
level: verbose
message: "possibly useless use of {slice} in void context"
tokens:
# The order of the tokens at the beginning is important, because we use them
# for a lookup table.
- name: EOF
diagnostic_name: "end-of-input"
value: 1
comment: final token in the file
- name: BRACE_RIGHT
diagnostic_name: "'}'"
comment: "}"
- name: COMMA
diagnostic_name: "','"
comment: ","
- name: EMBEXPR_END
diagnostic_name: "'}'"
comment: "}"
- name: HEREDOC_END
diagnostic_name: "heredoc ending"
comment: "the end of a heredoc"
- name: KEYWORD_DO
diagnostic_name: "'do'"
comment: "do"
- name: KEYWORD_ELSE
diagnostic_name: "'else'"
comment: "else"
- name: KEYWORD_ELSIF
diagnostic_name: "'elsif'"
comment: "elsif"
- name: KEYWORD_END
diagnostic_name: "'end'"
comment: "end"
- name: KEYWORD_ENSURE
diagnostic_name: "'ensure'"
comment: "ensure"
- name: KEYWORD_IN
diagnostic_name: "'in'"
comment: "in"
- name: KEYWORD_RESCUE
diagnostic_name: "'rescue'"
comment: "rescue"
- name: KEYWORD_THEN
diagnostic_name: "'then'"
comment: "then"
- name: KEYWORD_WHEN
diagnostic_name: "'when'"
comment: "when"
- name: NEWLINE
diagnostic_name: "newline"
comment: "a newline character outside of other tokens"
- name: NEWLINE_TERMINATOR
diagnostic_name: "newline"
comment: "a newline that terminates a construct where a newline is otherwise insignificant"
- name: PARENTHESIS_RIGHT
diagnostic_name: "')'"
comment: ")"
- name: PIPE
diagnostic_name: "'|'"
comment: "|"
- name: SEMICOLON
diagnostic_name: "';'"
comment: ";"
# Tokens from here on are not used for lookup, and can be in any order.
- name: AMPERSAND
diagnostic_name: "'&'"
comment: "&"
- name: AMPERSAND_AMPERSAND
diagnostic_name: "'&&'"
comment: "&&"
- name: AMPERSAND_AMPERSAND_EQUAL
diagnostic_name: "'&&='"
comment: "&&="
- name: AMPERSAND_DOT
diagnostic_name: "'&.'"
comment: "&."
- name: AMPERSAND_EQUAL
diagnostic_name: "'&='"
comment: "&="
- name: BACKTICK
diagnostic_name: "'`'"
comment: "` as a method name"
- name: BACK_REFERENCE
diagnostic_name: "back reference"
comment: "a back reference"
- name: BANG
diagnostic_name: "'!'"
comment: "! or !@"
- name: BANG_EQUAL
diagnostic_name: "'!='"
comment: "!="
- name: BANG_TILDE
diagnostic_name: "'!~'"
comment: "!~"
- name: BRACE_LEFT
diagnostic_name: "'{'"
comment: "{"
- name: BRACE_LEFT_ARGUMENT
diagnostic_name: "'{'"
comment: "{ for a block following a parenthesized argument"
- name: BRACE_LEFT_HASH
diagnostic_name: "'{'"
comment: "{ for a hash literal"
- name: BRACKET_LEFT
diagnostic_name: "'['"
comment: "["
- name: BRACKET_LEFT_ARRAY
diagnostic_name: "'['"
comment: "[ for the beginning of an array"
- name: BRACKET_LEFT_RIGHT
diagnostic_name: "'[]'"
comment: "[]"
- name: BRACKET_LEFT_RIGHT_EQUAL
diagnostic_name: "'[]='"
comment: "[]="
- name: BRACKET_RIGHT
diagnostic_name: "']'"
comment: "]"
- name: CARET
diagnostic_name: "'^'"
comment: "^"
- name: CARET_EQUAL
diagnostic_name: "'^='"
comment: "^="
- name: CHARACTER_LITERAL
diagnostic_name: "character literal"
comment: "a character literal"
- name: CLASS_VARIABLE
diagnostic_name: "class variable"
comment: "a class variable"
- name: COLON
diagnostic_name: "':'"
comment: ":"
- name: COLON_COLON
diagnostic_name: "'::'"
comment: "::"
- name: COMMENT
diagnostic_name: "comment"
comment: "a comment"
- name: CONSTANT
diagnostic_name: "constant"
comment: "a constant"
- name: DOT
diagnostic_name: "'.'"
comment: "the . call operator"
- name: DOT_DOT
diagnostic_name: ".."
comment: "the .. range operator"
- name: DOT_DOT_DOT
diagnostic_name: "..."
comment: "the ... range operator or forwarding parameter"
- name: EMBDOC_BEGIN
diagnostic_name: "'=begin'"
comment: "=begin"
- name: EMBDOC_END
diagnostic_name: "'=end'"
comment: "=end"
- name: EMBDOC_LINE
diagnostic_name: "embedded documentation line"
comment: "a line inside of embedded documentation"
- name: EMBEXPR_BEGIN
diagnostic_name: "'#{'"
comment: "#{"
- name: EMBVAR
diagnostic_name: "'#'"
comment: "#"
- name: EQUAL
diagnostic_name: "'='"
comment: "="
- name: EQUAL_EQUAL
diagnostic_name: "'=='"
comment: "=="
- name: EQUAL_EQUAL_EQUAL
diagnostic_name: "'==='"
comment: "==="
- name: EQUAL_GREATER
diagnostic_name: "'=>'"
comment: "=>"
- name: EQUAL_TILDE
diagnostic_name: "'=~'"
comment: "=~"
- name: FLOAT
diagnostic_name: "float"
comment: "a floating point number"
- name: FLOAT_IMAGINARY
diagnostic_name: "imaginary"
comment: "a floating pointer number with an imaginary suffix"
- name: FLOAT_RATIONAL
diagnostic_name: "rational"
comment: "a floating pointer number with a rational suffix"
- name: FLOAT_RATIONAL_IMAGINARY
diagnostic_name: "imaginary"
comment: "a floating pointer number with a rational and imaginary suffix"
- name: GLOBAL_VARIABLE
diagnostic_name: "global variable"
comment: "a global variable"
- name: GREATER
diagnostic_name: "'>'"
comment: ">"
- name: GREATER_EQUAL
diagnostic_name: "'>='"
comment: ">="
- name: GREATER_GREATER
diagnostic_name: ">>"
comment: ">>"
- name: GREATER_GREATER_EQUAL
diagnostic_name: ">>="
comment: ">>="
- name: HEREDOC_START
diagnostic_name: "heredoc beginning"
comment: "the start of a heredoc"
- name: IDENTIFIER
diagnostic_name: "local variable or method"
comment: "an identifier"
- name: IGNORED_NEWLINE
diagnostic_name: "ignored newline"
comment: "an ignored newline"
- name: INSTANCE_VARIABLE
diagnostic_name: "instance variable"
comment: "an instance variable"
- name: INTEGER
diagnostic_name: "integer"
comment: "an integer (any base)"
- name: INTEGER_IMAGINARY
diagnostic_name: "imaginary"
comment: "an integer with an imaginary suffix"
- name: INTEGER_RATIONAL
diagnostic_name: "rational"
comment: "an integer with a rational suffix"
- name: INTEGER_RATIONAL_IMAGINARY
diagnostic_name: "imaginary"
comment: "an integer with a rational and imaginary suffix"
- name: KEYWORD_ALIAS
diagnostic_name: "'alias'"
comment: "alias"
- name: KEYWORD_AND
diagnostic_name: "'and'"
comment: "and"
- name: KEYWORD_BEGIN
diagnostic_name: "'begin'"
comment: "begin"
- name: KEYWORD_BEGIN_UPCASE
diagnostic_name: "'BEGIN'"
comment: "BEGIN"
- name: KEYWORD_BREAK
diagnostic_name: "'break'"
comment: "break"
- name: KEYWORD_CASE
diagnostic_name: "'case'"
comment: "case"
- name: KEYWORD_CLASS
diagnostic_name: "'class'"
comment: "class"
- name: KEYWORD_DEF
diagnostic_name: "'def'"
comment: "def"
- name: KEYWORD_DEFINED
diagnostic_name: "'defined?'"
comment: "defined?"
- name: KEYWORD_DO_BLOCK
diagnostic_name: "'do'"
comment: "do keyword for a block attached to a command"
- name: KEYWORD_DO_LAMBDA
diagnostic_name: "'do'"
comment: "do keyword that opens the body of a lambda literal"
- name: KEYWORD_DO_LOOP
diagnostic_name: "'do'"
comment: "do keyword for a predicate in a while, until, or for loop"
- name: KEYWORD_END_UPCASE
diagnostic_name: "'END'"
comment: "END"
- name: KEYWORD_FALSE
diagnostic_name: "'false'"
comment: "false"
- name: KEYWORD_FOR
diagnostic_name: "'for'"
comment: "for"
- name: KEYWORD_IF
diagnostic_name: "'if'"
comment: "if"
- name: KEYWORD_IF_MODIFIER
diagnostic_name: "'if'"
comment: "if in the modifier form"
- name: KEYWORD_MODULE
diagnostic_name: "'module'"
comment: "module"
- name: KEYWORD_NEXT
diagnostic_name: "'next'"
comment: "next"
- name: KEYWORD_NIL
diagnostic_name: "'nil'"
comment: "nil"
- name: KEYWORD_NOT
diagnostic_name: "'not'"
comment: "not"
- name: KEYWORD_OR
diagnostic_name: "'or'"
comment: "or"
- name: KEYWORD_REDO
diagnostic_name: "'redo'"
comment: "redo"