Skip to content

Commit 3271ec9

Browse files
committed
resolve #20
1 parent f1c33ed commit 3271ec9

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

Test/src/CodeFormatTest.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ int main(int argc, char* argv[])
153153
if (target == "CheckFormatResult")
154154
{
155155
auto options = std::make_shared<LuaCodeStyleOptions>();
156-
#ifndef _WIN32
157-
options->end_of_line = "\n";
158-
#endif
159156
std::filesystem::path formattedRoot(commandLine.Get<std::string>("formatted-work-directory"));
160157
for (auto& path : luaFiles)
161158
{
@@ -190,10 +187,6 @@ int main(int argc, char* argv[])
190187
for (auto& path : luaFiles)
191188
{
192189
auto options = editorConfig->Generate(path);
193-
#ifndef _WIN32
194-
options->end_of_line = "\n";
195-
#endif
196-
197190
auto waitFormattingFilePath = workRoot / path;
198191
auto waitFormattingText = ReadFile(waitFormattingFilePath.string());
199192

@@ -227,9 +220,6 @@ int main(int argc, char* argv[])
227220
else if(target == "Performance")
228221
{
229222
auto options = std::make_shared<LuaCodeStyleOptions>();
230-
#ifndef _WIN32
231-
options->end_of_line = "\n";
232-
#endif
233223
for (auto& path : luaFiles)
234224
{
235225
auto waitFormattingFilePath = workRoot / path;

Test/test_script/format_text/wait_format_by_option/.editorconfig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ local_assign_continuation_align_to_first_expression = false
1818
# function call expression's args will align to first arg
1919
# however, if the args has cross row arg, it will not be aligned to the first arg
2020
align_call_args = false
21-
# if true, format like this "print( "123", 456 )"
22-
keep_one_space_between_call_args_and_parentheses = false
2321
# if true, all function define params will align to first param
2422
align_function_define_params = true
2523
# if true, format like this "local t = { 1, 2, 3 }"
@@ -30,9 +28,6 @@ align_table_field_to_first_field = false
3028
keep_one_space_between_namedef_and_attribute = false
3129
# continous line distance
3230
max_continuous_line_distance = 1
33-
# if true, iff any one of the consecutive rows meets the condition of aligning to the equal sign,
34-
# the consecutive rows will be aligned to the equal sign
35-
weak_alignment_rule = false
3631
# see document for detail
3732
continuous_assign_statement_align_to_equal_sign = true
3833
# see document for detail
@@ -45,7 +40,7 @@ do_statement_no_indent = false
4540
if_condition_no_continuation_indent = false
4641

4742
# optional crlf/lf
48-
end_of_line = crlf
43+
end_of_line = auto
4944

5045
# [Row layout]
5146
# The following configuration supports three expressions

Test/test_script/format_text/wait_format_by_option_should_be/.editorconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ local_assign_continuation_align_to_first_expression = false
1616
# function call expression's args will align to first arg
1717
# however, if the args has cross row arg, it will not be aligned to the first arg
1818
align_call_args = false
19-
# if true, format like this "print( "123", 456 )"
20-
keep_one_space_between_call_args_and_parentheses = false
2119
# if true, all function define params will align to first param
2220
align_function_define_params = true
2321
# if true, format like this "local t = { 1, 2, 3 }"
@@ -38,7 +36,7 @@ do_statement_no_indent = false
3836
if_condition_no_continuation_indent = false
3937

4038
# optional crlf/lf
41-
end_of_line = crlf
39+
end_of_line = auto
4240

4341
# [Row layout]
4442
# The following configuration supports three expressions

0 commit comments

Comments
 (0)