Skip to content

Commit 6060d7a

Browse files
committed
修改测试用例
1 parent 8bf9734 commit 6060d7a

File tree

6 files changed

+1
-143
lines changed

6 files changed

+1
-143
lines changed
Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,4 @@
11

22
# see https://github.com/CppCXY/EmmyLuaCodeStyle
33
[*.lua]
4-
# optional space/tab
5-
indent_style = space
6-
# if indent_style is space, this is valid
7-
indent_size = 4
8-
# if indent_style is tab, this is valid
9-
tab_width = 4
10-
continuation_indent_size = 4
11-
align_call_args = false
12-
keep_one_space_between_call_args_and_bracket = false
13-
align_function_define_params = true
14-
keep_one_space_between_table_and_bracket = true
15-
align_table_field_to_first_field = true
16-
continuous_assign_statement_align_to_equal_sign = true
17-
continuous_assign_table_field_align_to_equal_sign = true
18-
# optional crlf/lf
19-
end_of_line = crlf
20-
21-
# The following configuration supports three expressions
22-
# minLine:${n}
23-
# keepLine
24-
# KeepLine:${n}
25-
26-
keep_line_after_if_statement = minLine:1
27-
keep_line_after_do_statement = minLine:1
28-
keep_line_after_while_statement = minLine:1
29-
keep_line_after_repeat_statement = minLine:1
30-
keep_line_after_for_statement = minLine:1
31-
keep_line_after_local_or_assign_statement = keepLine
32-
keep_line_after_function_define_statement = keepLine:1
33-
34-
# the following is code diagnostic options
35-
enable_check_codestyle = false
36-
# this mean utf8 length
37-
max_line_length = 120
38-
# this will check text end with new line(format always end with new line)
39-
insert_final_newline = true
40-
41-
42-
enable_name_style_check = true
43-
# the following is name style check rule
44-
# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case)
45-
# all option can use '|' represent or
46-
# for example:
47-
# snake_case | upper_snake_case
48-
# same(first_param, snake_case)
49-
# same('m')
50-
local_name_define_style = snake_case
51-
function_param_name_style = snake_case
52-
function_name_define_style = snake_case
53-
local_function_name_define_style = snake_case
54-
table_field_name_define_style = snake_case
55-
global_variable_name_define_style = snake_case|upper_snake_case
56-
module_name_define_style = same('m')|same(filename, snake_case)
57-
require_module_name_style = same(first_param, snake_case)
58-
class_name_define_style = same(filename, snake_case)
4+
enable_check_codestyle = false
Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,2 @@
11

22
# see https://github.com/CppCXY/EmmyLuaCodeStyle
3-
[*.lua]
4-
# [basic code reformat option]
5-
# optional space/tab
6-
indent_style = space
7-
# if indent_style is space, this is valid
8-
indent_size = 4
9-
# if indent_style is tab, this is valid
10-
tab_width = 4
11-
# only support number
12-
continuation_indent_size = 4
13-
# if true, continuation_indent_size for local or assign statement is invalid
14-
# however, if the expression list has cross row expression, it will not be aligned to the first expression
15-
local_assign_continuation_align_to_first_expression = false
16-
# function call expression's args will align to first arg
17-
# however, if the args has cross row arg, it will not be aligned to the first arg
18-
align_call_args = false
19-
# if true, format like this "print( "123", 456 )"
20-
keep_one_space_between_call_args_and_parentheses = false
21-
# if true, all function define params will align to first param
22-
align_function_define_params = true
23-
# if true, format like this "local t = { 1, 2, 3 }"
24-
keep_one_space_between_table_and_bracket = true
25-
# if indent_style is tab, this option is invalid
26-
align_table_field_to_first_field = false
27-
# if true, ormat like this "local t <const> = 1"
28-
keep_one_space_between_namedef_and_attribute = false
29-
# see document for detail
30-
continuous_assign_statement_align_to_equal_sign = true
31-
# see document for detail
32-
continuous_assign_table_field_align_to_equal_sign = true
33-
# if true, the label loses its current indentation
34-
label_no_indent = false
35-
# if true, there will be no indentation in the do statement
36-
do_statement_no_indent = false
37-
# if true, the conditional expression of the if statement will not be a continuation line indent
38-
if_condition_no_continuation_indent = false
39-
40-
# optional crlf/lf
41-
end_of_line = crlf
42-
43-
# [Row layout]
44-
# The following configuration supports three expressions
45-
# minLine:${n}
46-
# keepLine
47-
# KeepLine:${n}
48-
49-
keep_line_after_if_statement = minLine:0
50-
keep_line_after_do_statement = minLine:0
51-
keep_line_after_while_statement = minLine:0
52-
keep_line_after_repeat_statement = minLine:0
53-
keep_line_after_for_statement = minLine:0
54-
keep_line_after_local_or_assign_statement = keepLine
55-
keep_line_after_function_define_statement = keepLine:1
56-
57-
# [diagnostic]
58-
# the following is code diagnostic options
59-
enable_check_codestyle = true
60-
# this mean utf8 length
61-
max_line_length = 120
62-
# this will check text end with new line(format always end with new line)
63-
insert_final_newline = true
64-
65-
# [name style check]
66-
enable_name_style_check = false
67-
# the following is name style check rule
68-
# base option off/camel_case/snake_case/upper_snake_case/pascal_case/same(filename/first_param/'<const string>', snake_case/pascal_case/camel_case)
69-
# all option can use '|' represent or
70-
# for example:
71-
# snake_case | upper_snake_case
72-
# same(first_param, snake_case)
73-
# same('m')
74-
local_name_define_style = snake_case
75-
function_param_name_style = snake_case
76-
function_name_define_style = snake_case
77-
local_function_name_define_style = snake_case
78-
table_field_name_define_style = snake_case
79-
global_variable_name_define_style = snake_case|upper_snake_case
80-
module_name_define_style = same('m')|same(filename, snake_case)
81-
require_module_name_style = same(first_param, snake_case)
82-
class_name_define_style = same(filename, snake_case)

Test/test_script/format_text/wait_format_should_be/do.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
do return end
2-
32
do print("end") end
4-
53
do
64
return x, b, v
75
end
8-
96
do
107

118
do return end

Test/test_script/format_text/wait_format_should_be/if.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
if aaa then end
2-
32
if aaa + bbb + ccc == 123 then end
43

54
if aaa + bbb and
@@ -12,7 +11,6 @@ if aaa + bbb and
1211
else --hahh
1312
end
1413
end
15-
1614
if a then
1715
elseif aa then
1816
elseif ccc then

Test/test_script/format_text/wait_format_should_be/repeat.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
repeat local t = 13 until x == 1
2-
32
repeat
43
do print() end
54
until true
6-
75
repeat
86
local function f() do return end end
97
until aa + bbb + ccc

Test/test_script/format_text/wait_format_should_be/while.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ end
1111

1212
while true do --fff
1313
end
14-
1514
--ffff

0 commit comments

Comments
 (0)