You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/en-us/config.md
+217Lines changed: 217 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,7 @@ Array<string>
190
190
191
191
*``"action-after-return"``
192
192
*``"ambiguity-1"``
193
+
*``"ambiguous-syntax"``
193
194
*``"args-after-dots"``
194
195
*``"assign-type-mismatch"``
195
196
*``"await-in-sync"``
@@ -654,26 +655,74 @@ object<string, string>
654
655
Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.
655
656
*/
656
657
"ambiguity-1":"Any",
658
+
/*
659
+
Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.
660
+
*/
657
661
"assign-type-mismatch":"Opened",
662
+
/*
663
+
Enable diagnostics for calls of asynchronous functions within a synchronous function.
664
+
*/
658
665
"await-in-sync":"None",
666
+
/*
667
+
Enable diagnostics for casts of local variables where the target type does not match the defined type.
668
+
*/
659
669
"cast-local-type":"Opened",
670
+
/*
671
+
Enable diagnostics for casts where the target type does not match the initial type.
672
+
*/
660
673
"cast-type-mismatch":"Opened",
661
674
"circle-doc-class":"Any",
675
+
/*
676
+
Enable diagnostics for attempts to close a variable with a non-object.
677
+
*/
662
678
"close-non-object":"Any",
679
+
/*
680
+
Enable diagnostics for code placed after a break statement in a loop.
681
+
*/
663
682
"code-after-break":"Opened",
683
+
/*
684
+
Enable diagnostics for incorrectly styled lines.
685
+
*/
664
686
"codestyle-check":"None",
687
+
/*
688
+
Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.
689
+
*/
665
690
"count-down-loop":"Any",
691
+
/*
692
+
Enable diagnostics to highlight deprecated API.
693
+
*/
666
694
"deprecated":"Any",
695
+
/*
696
+
Enable diagnostics for files which are required by two different paths.
697
+
*/
667
698
"different-requires":"Any",
699
+
/*
700
+
Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.
701
+
*/
668
702
"discard-returns":"Any",
703
+
/*
704
+
Enable diagnostics to highlight a field annotation without a defining class annotation.
705
+
*/
669
706
"doc-field-no-class":"Any",
707
+
/*
708
+
Enable diagnostics for a duplicated alias annotation name.
709
+
*/
670
710
"duplicate-doc-alias":"Any",
711
+
/*
712
+
Enable diagnostics for a duplicated field annotation name.
713
+
*/
671
714
"duplicate-doc-field":"Any",
715
+
/*
716
+
Enable diagnostics for a duplicated param annotation name.
717
+
*/
672
718
"duplicate-doc-param":"Any",
673
719
/*
674
720
Enable duplicate table index diagnostics.
675
721
*/
676
722
"duplicate-index":"Any",
723
+
/*
724
+
Enable diagnostics for setting the same field in a class more than once.
725
+
*/
677
726
"duplicate-set-field":"Any",
678
727
/*
679
728
Enable empty code block diagnostics.
@@ -687,9 +736,21 @@ object<string, string>
687
736
Enable lowercase global variable definition diagnostics.
688
737
*/
689
738
"lowercase-global":"Any",
739
+
/*
740
+
Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.
741
+
*/
690
742
"missing-parameter":"Any",
743
+
/*
744
+
Enable diagnostics for functions with return annotations which have no return statement.
745
+
*/
691
746
"missing-return":"Any",
747
+
/*
748
+
Enable diagnostics for return statements without values although the containing function declares returns.
749
+
*/
692
750
"missing-return-value":"Any",
751
+
/*
752
+
Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.
753
+
*/
693
754
"need-check-nil":"Opened",
694
755
/*
695
756
Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.
@@ -699,8 +760,17 @@ object<string, string>
699
760
Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.
700
761
*/
701
762
"newline-call":"Any",
763
+
/*
764
+
Enable diagnostics for cases in which the type cannot be inferred.
765
+
*/
702
766
"no-unknown":"None",
767
+
/*
768
+
Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.
769
+
*/
703
770
"not-yieldable":"None",
771
+
/*
772
+
Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.
773
+
*/
704
774
"param-type-mismatch":"Opened",
705
775
/*
706
776
Enable redefined local variable diagnostics.
@@ -710,34 +780,73 @@ object<string, string>
710
780
Enable redundant function parameter diagnostics.
711
781
*/
712
782
"redundant-parameter":"Any",
783
+
/*
784
+
Enable diagnostics for return statements which are not needed because the function would exit on its own.
785
+
*/
713
786
"redundant-return":"Opened",
787
+
/*
788
+
Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.
789
+
*/
714
790
"redundant-return-value":"Any",
715
791
/*
716
792
Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned.
717
793
*/
718
794
"redundant-value":"Any",
795
+
/*
796
+
Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.
797
+
*/
719
798
"return-type-mismatch":"Opened",
799
+
/*
800
+
Enable diagnostics for typos in strings.
801
+
*/
720
802
"spell-check":"None",
721
803
/*
722
804
Enable trailing space diagnostics.
723
805
*/
724
806
"trailing-space":"Opened",
807
+
/*
808
+
Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).
809
+
*/
725
810
"unbalanced-assignments":"Any",
811
+
/*
812
+
Enable diagnostics for class annotations in which an undefined class is referenced.
813
+
*/
726
814
"undefined-doc-class":"Any",
815
+
/*
816
+
Enable diagnostics for type annotations referencing an undefined type or alias.
817
+
*/
727
818
"undefined-doc-name":"Any",
819
+
/*
820
+
Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.
821
+
*/
728
822
"undefined-doc-param":"Any",
729
823
/*
730
824
Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.
731
825
*/
732
826
"undefined-env-child":"Any",
827
+
/*
828
+
Enable diagnostics for cases in which an undefined field of a variable is read.
829
+
*/
733
830
"undefined-field":"Opened",
734
831
/*
735
832
Enable undefined global variable diagnostics.
736
833
*/
737
834
"undefined-global":"Any",
835
+
/*
836
+
Enable diagnostics for casts of undefined variables.
837
+
*/
738
838
"unknown-cast-variable":"Any",
839
+
/*
840
+
Enable diagnostics in cases in which an unknown diagnostics code is entered.
841
+
*/
739
842
"unknown-diag-code":"Any",
843
+
/*
844
+
Enable diagnostics for unknown operators.
845
+
*/
740
846
"unknown-operator":"Any",
847
+
/*
848
+
Enable diagnostics for unreachable code.
849
+
*/
741
850
"unreachable-code":"Opened",
742
851
/*
743
852
Enable unused function diagnostics.
@@ -790,26 +899,74 @@ object<string, string>
790
899
Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.
791
900
*/
792
901
"ambiguity-1":"Warning",
902
+
/*
903
+
Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.
904
+
*/
793
905
"assign-type-mismatch":"Warning",
906
+
/*
907
+
Enable diagnostics for calls of asynchronous functions within a synchronous function.
908
+
*/
794
909
"await-in-sync":"Warning",
910
+
/*
911
+
Enable diagnostics for casts of local variables where the target type does not match the defined type.
912
+
*/
795
913
"cast-local-type":"Warning",
914
+
/*
915
+
Enable diagnostics for casts where the target type does not match the initial type.
916
+
*/
796
917
"cast-type-mismatch":"Warning",
797
918
"circle-doc-class":"Warning",
919
+
/*
920
+
Enable diagnostics for attempts to close a variable with a non-object.
921
+
*/
798
922
"close-non-object":"Warning",
923
+
/*
924
+
Enable diagnostics for code placed after a break statement in a loop.
925
+
*/
799
926
"code-after-break":"Hint",
927
+
/*
928
+
Enable diagnostics for incorrectly styled lines.
929
+
*/
800
930
"codestyle-check":"Warning",
931
+
/*
932
+
Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.
933
+
*/
801
934
"count-down-loop":"Warning",
935
+
/*
936
+
Enable diagnostics to highlight deprecated API.
937
+
*/
802
938
"deprecated":"Warning",
939
+
/*
940
+
Enable diagnostics for files which are required by two different paths.
941
+
*/
803
942
"different-requires":"Warning",
943
+
/*
944
+
Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.
945
+
*/
804
946
"discard-returns":"Warning",
947
+
/*
948
+
Enable diagnostics to highlight a field annotation without a defining class annotation.
949
+
*/
805
950
"doc-field-no-class":"Warning",
951
+
/*
952
+
Enable diagnostics for a duplicated alias annotation name.
953
+
*/
806
954
"duplicate-doc-alias":"Warning",
955
+
/*
956
+
Enable diagnostics for a duplicated field annotation name.
957
+
*/
807
958
"duplicate-doc-field":"Warning",
959
+
/*
960
+
Enable diagnostics for a duplicated param annotation name.
961
+
*/
808
962
"duplicate-doc-param":"Warning",
809
963
/*
810
964
Enable duplicate table index diagnostics.
811
965
*/
812
966
"duplicate-index":"Warning",
967
+
/*
968
+
Enable diagnostics for setting the same field in a class more than once.
969
+
*/
813
970
"duplicate-set-field":"Warning",
814
971
/*
815
972
Enable empty code block diagnostics.
@@ -823,9 +980,21 @@ object<string, string>
823
980
Enable lowercase global variable definition diagnostics.
824
981
*/
825
982
"lowercase-global":"Information",
983
+
/*
984
+
Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.
985
+
*/
826
986
"missing-parameter":"Warning",
987
+
/*
988
+
Enable diagnostics for functions with return annotations which have no return statement.
989
+
*/
827
990
"missing-return":"Warning",
991
+
/*
992
+
Enable diagnostics for return statements without values although the containing function declares returns.
993
+
*/
828
994
"missing-return-value":"Warning",
995
+
/*
996
+
Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.
997
+
*/
829
998
"need-check-nil":"Warning",
830
999
/*
831
1000
Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.
@@ -835,8 +1004,17 @@ object<string, string>
835
1004
Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.
836
1005
*/
837
1006
"newline-call":"Warning",
1007
+
/*
1008
+
Enable diagnostics for cases in which the type cannot be inferred.
1009
+
*/
838
1010
"no-unknown":"Warning",
1011
+
/*
1012
+
Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.
1013
+
*/
839
1014
"not-yieldable":"Warning",
1015
+
/*
1016
+
Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.
1017
+
*/
840
1018
"param-type-mismatch":"Warning",
841
1019
/*
842
1020
Enable redefined local variable diagnostics.
@@ -846,34 +1024,73 @@ object<string, string>
846
1024
Enable redundant function parameter diagnostics.
847
1025
*/
848
1026
"redundant-parameter":"Warning",
1027
+
/*
1028
+
Enable diagnostics for return statements which are not needed because the function would exit on its own.
1029
+
*/
849
1030
"redundant-return":"Hint",
1031
+
/*
1032
+
Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.
1033
+
*/
850
1034
"redundant-return-value":"Warning",
851
1035
/*
852
1036
Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned.
853
1037
*/
854
1038
"redundant-value":"Warning",
1039
+
/*
1040
+
Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.
1041
+
*/
855
1042
"return-type-mismatch":"Warning",
1043
+
/*
1044
+
Enable diagnostics for typos in strings.
1045
+
*/
856
1046
"spell-check":"Information",
857
1047
/*
858
1048
Enable trailing space diagnostics.
859
1049
*/
860
1050
"trailing-space":"Hint",
1051
+
/*
1052
+
Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).
1053
+
*/
861
1054
"unbalanced-assignments":"Warning",
1055
+
/*
1056
+
Enable diagnostics for class annotations in which an undefined class is referenced.
1057
+
*/
862
1058
"undefined-doc-class":"Warning",
1059
+
/*
1060
+
Enable diagnostics for type annotations referencing an undefined type or alias.
1061
+
*/
863
1062
"undefined-doc-name":"Warning",
1063
+
/*
1064
+
Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.
1065
+
*/
864
1066
"undefined-doc-param":"Warning",
865
1067
/*
866
1068
Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.
867
1069
*/
868
1070
"undefined-env-child":"Information",
1071
+
/*
1072
+
Enable diagnostics for cases in which an undefined field of a variable is read.
1073
+
*/
869
1074
"undefined-field":"Warning",
870
1075
/*
871
1076
Enable undefined global variable diagnostics.
872
1077
*/
873
1078
"undefined-global":"Warning",
1079
+
/*
1080
+
Enable diagnostics for casts of undefined variables.
1081
+
*/
874
1082
"unknown-cast-variable":"Warning",
1083
+
/*
1084
+
Enable diagnostics in cases in which an unknown diagnostics code is entered.
0 commit comments