-
-
Notifications
You must be signed in to change notification settings - Fork 945
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comments about snake_case (#2019)
- Loading branch information
1 parent
3af195d
commit b518000
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
analyzer-comments/elixir/solution/function_name_snake_case.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} | ||
``` |
17 changes: 17 additions & 0 deletions
17
analyzer-comments/elixir/solution/module_attribute_name_snake_case.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} | ||
``` |