Add lua-format config and auto-format all exercises

This commit is contained in:
Camden Dixie O'Brien 2023-12-11 12:11:47 +00:00
parent 467ca0446a
commit 017ef8bac4
9 changed files with 79 additions and 54 deletions

33
.lua-format Normal file
View 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

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function f()
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function is_anagram(str1, str2)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function greatest_common_divisor(x, y)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function hamming_distance(str1, str2)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function is_leap_year(year)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function is_prime(x)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
function is_queen_threat(queen_position, pawn_position)
-- Your implementation here
end

View File

@ -1,5 +1,4 @@
-- Solution --------------------------------------------------------------------
-- Give the colours whatever values are convenient
black = undefined
brown = undefined