Skip to content

Commit

Permalink
Add comments about snake_case (#2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska authored Jul 10, 2021
1 parent 3af195d commit b518000
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions analyzer-comments/elixir/solution/function_name_snake_case.md
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}
```
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}
```

0 comments on commit b518000

Please sign in to comment.