Add lua-format config and auto-format all exercises
This commit is contained in:
parent
467ca0446a
commit
017ef8bac4
33
.lua-format
Normal file
33
.lua-format
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
column_limit: 80
|
||||||
|
indent_width: 1
|
||||||
|
use_tab: true
|
||||||
|
tab_width: 4
|
||||||
|
continuation_indent_width: 1
|
||||||
|
spaces_before_call: 1
|
||||||
|
keep_simple_control_block_one_line: true
|
||||||
|
keep_simple_function_one_line: false
|
||||||
|
align_args: true
|
||||||
|
break_after_functioncall_lp: false
|
||||||
|
break_before_functioncall_rp: false
|
||||||
|
spaces_inside_functioncall_parens: false
|
||||||
|
spaces_inside_functiondef_parens: false
|
||||||
|
align_parameter: true
|
||||||
|
chop_down_parameter: false
|
||||||
|
break_after_functiondef_lp: false
|
||||||
|
break_before_functiondef_rp: false
|
||||||
|
align_table_field: true
|
||||||
|
break_after_table_lb: true
|
||||||
|
break_before_table_rb: true
|
||||||
|
chop_down_table: false
|
||||||
|
chop_down_kv_table: true
|
||||||
|
table_sep: ","
|
||||||
|
extra_sep_at_table_end: false
|
||||||
|
column_table_limit: 0
|
||||||
|
column_table_limit_kv: 0
|
||||||
|
spaces_inside_table_braces: false
|
||||||
|
break_after_operator: true
|
||||||
|
double_quote_to_single_quote: false
|
||||||
|
single_quote_to_double_quote: false
|
||||||
|
spaces_around_equals_in_field: true
|
||||||
|
line_breaks_after_function_body: 1
|
||||||
|
line_separator: input
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function f()
|
function f()
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function is_anagram(str1, str2)
|
function is_anagram(str1, str2)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function greatest_common_divisor(x, y)
|
function greatest_common_divisor(x, y)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function hamming_distance(str1, str2)
|
function hamming_distance(str1, str2)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function is_leap_year(year)
|
function is_leap_year(year)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function is_prime(x)
|
function is_prime(x)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
function is_queen_threat(queen_position, pawn_position)
|
function is_queen_threat(queen_position, pawn_position)
|
||||||
-- Your implementation here
|
-- Your implementation here
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
|
|
||||||
-- Give the colours whatever values are convenient
|
-- Give the colours whatever values are convenient
|
||||||
black = undefined
|
black = undefined
|
||||||
brown = undefined
|
brown = undefined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user