File tree Expand file tree Collapse file tree 4 files changed +8
-29
lines changed
crates/emmylua_code_analysis Expand file tree Collapse file tree 4 files changed +8
-29
lines changed Original file line number Diff line number Diff line change 159159 "strict" : {
160160 "default" : {
161161 "arrayIndex" : true ,
162- "docIntegerMatchInt " : true ,
162+ "docIntegerConstMatchInt " : true ,
163163 "metaOverrideFileDefine" : true ,
164164 "requirePath" : false ,
165165 "typeCall" : false
267267 " redundant-parameter"
268268 ]
269269 },
270- {
271- "description" : " Inject field fail" ,
272- "type" : " string" ,
273- "enum" : [
274- " inject-field-fail"
275- ]
276- },
277270 {
278271 "description" : " Unreachable code" ,
279272 "type" : " string" ,
316309 " discard-returns"
317310 ]
318311 },
319- {
320- "description" : " Disable global define" ,
321- "type" : " string" ,
322- "enum" : [
323- " disable-global-define"
324- ]
325- },
326312 {
327313 "description" : " Undefined field" ,
328314 "type" : " string" ,
365351 " redefined-label"
366352 ]
367353 },
368- {
369- "description" : " Name Style check" ,
370- "type" : " string" ,
371- "enum" : [
372- " name-style-check"
373- ]
374- },
375354 {
376355 "description" : " Code style check" ,
377356 "type" : " string" ,
946925 "default" : true ,
947926 "type" : " boolean"
948927 },
949- "docIntegerMatchInt " : {
950- "description" : " `doc_integer ` type can match `int` type." ,
928+ "docIntegerConstMatchInt " : {
929+ "description" : " `doc_integer_const ` type can match `int` type." ,
951930 "default" : false ,
952931 "type" : " boolean"
953932 },
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ pub struct EmmyrcStrict {
2424 /// meta define overrides file define
2525 #[ serde( default = "default_true" ) ]
2626 pub meta_override_file_define : bool ,
27- /// `doc_integer ` type can match `int` type.
27+ /// `doc_integer_const ` type can match `int` type.
2828 #[ serde( default = "default_false" ) ]
29- pub doc_integer_match_int : bool ,
29+ pub doc_integer_const_match_int : bool ,
3030}
3131
3232impl Default for EmmyrcStrict {
@@ -36,7 +36,7 @@ impl Default for EmmyrcStrict {
3636 type_call : false ,
3737 array_index : true ,
3838 meta_override_file_define : true ,
39- doc_integer_match_int : true ,
39+ doc_integer_const_match_int : true ,
4040 }
4141 }
4242}
Original file line number Diff line number Diff line change @@ -1024,7 +1024,7 @@ mod test {
10241024 fn test_int_to_alias ( ) {
10251025 let mut ws = VirtualWorkspace :: new ( ) ;
10261026 let mut emmyrc = ws. analysis . get_emmyrc ( ) . deref ( ) . clone ( ) ;
1027- emmyrc. strict . doc_integer_match_int = true ;
1027+ emmyrc. strict . doc_integer_const_match_int = true ;
10281028 ws. analysis . update_config ( Arc :: new ( emmyrc) ) ;
10291029
10301030 assert ! ( ws. check_code_for(
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ pub fn check_simple_type_compact(
131131 return Err ( TypeCheckFailReason :: TypeNotMatch ) ;
132132 }
133133 LuaType :: Integer => {
134- if db. get_emmyrc ( ) . strict . doc_integer_match_int {
134+ if db. get_emmyrc ( ) . strict . doc_integer_const_match_int {
135135 return Ok ( ( ) ) ;
136136 }
137137 return Err ( TypeCheckFailReason :: TypeNotMatch ) ;
You can’t perform that action at this time.
0 commit comments