From 1f9a2de58c3f2b07db179935842226db58dff657 Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Fri, 9 Jul 2021 16:26:26 +0200 Subject: [PATCH] Add comments about snake_case --- .../elixir/solution/function_name_snake_case.md | 17 +++++++++++++++++ .../module_attribute_name_snake_case.md | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 analyzer-comments/elixir/solution/function_name_snake_case.md create mode 100644 analyzer-comments/elixir/solution/module_attribute_name_snake_case.md diff --git a/analyzer-comments/elixir/solution/function_name_snake_case.md b/analyzer-comments/elixir/solution/function_name_snake_case.md new file mode 100644 index 000000000..c2420601e --- /dev/null +++ b/analyzer-comments/elixir/solution/function_name_snake_case.md @@ -0,0 +1,17 @@ +# function name snake case + +[comment]: # (requires 2 params:) +[comment]: # (- expected: the corrected name) +[comment]: # (- actual: the incorrect name that the student used) + +Function, macro, and guard names are always written in snake_case in Elixir. + +```elixir +# snake_case + +%{expected} + +# not snake_case + +%{actual} +``` diff --git a/analyzer-comments/elixir/solution/module_attribute_name_snake_case.md b/analyzer-comments/elixir/solution/module_attribute_name_snake_case.md new file mode 100644 index 000000000..4f36ffc2c --- /dev/null +++ b/analyzer-comments/elixir/solution/module_attribute_name_snake_case.md @@ -0,0 +1,17 @@ +# module attribute name snake case + +[comment]: # (requires 2 params:) +[comment]: # (- expected: the corrected name) +[comment]: # (- actual: the incorrect name that the student used) + +Module attribute names are always written in snake_case in Elixir. + +```elixir +# snake_case + +@%{expected} + +# not snake_case + +@%{actual} +```