• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

exercism / elixir-analyzer / 81bb2bd44c91598e28b337a76394d2632f36db5b

29 Sep 2025 12:19AM UTC coverage: 98.524%. Remained the same
81bb2bd44c91598e28b337a76394d2632f36db5b

push

github

web-flow
Add analyzer for gotta-snatch-em-all (#451)

* Add analyzer for gotta-snatch-em-all

* Fix space alignment & formatting

* Add tests for gotta snatch em all analyzer

* Fix wording & spelling mistakes

Co-authored-by: Jie <jie.gillet@gmail.com>

---------

Co-authored-by: Jie <jie.gillet@gmail.com>

868 of 881 relevant lines covered (98.52%)

16232.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/elixir_analyzer/constants.ex
1
defmodule ElixirAnalyzer.Constants do
2
  @moduledoc """
3
  A list of Elixir analyzer comments, in the format:
4
  ```
5
  elixir.[directory].[filename]
6
  ```
7

8
  `[directory]` must correspond to a directory in https://github.com/exercism/website-copy/tree/main/analyzer-comments/elixir
9
  and `[filename].md` must be a file in that directory.
10
  """
11

12
  @constants [
13
    general_feedback_request: "elixir.general.feedback_request",
14

15
    # General Error Comments
16
    general_file_not_found: "elixir.general.file_not_found",
17
    general_parsing_error: "elixir.general.parsing_error",
18

19
    # General Solution Error / Warning Comments
20
    solution_use_moduledoc: "elixir.solution.use_module_doc",
21
    solution_use_specification: "elixir.solution.use_specification",
22
    solution_raise_fn_clause_error: "elixir.solution.raise_fn_clause_error",
23
    solution_module_attribute_name_snake_case: "elixir.solution.module_attribute_name_snake_case",
24
    solution_module_pascal_case: "elixir.solution.module_pascal_case",
25
    solution_function_name_snake_case: "elixir.solution.function_name_snake_case",
26
    solution_variable_name_snake_case: "elixir.solution.variable_name_snake_case",
27
    solution_indentation: "elixir.solution.indentation",
28
    solution_debug_functions: "elixir.solution.debug_functions",
29
    solution_last_line_assignment: "elixir.solution.last_line_assignment",
30
    solution_compiler_warnings: "elixir.solution.compiler_warnings",
31
    solution_def_with_is: "elixir.solution.def_with_is",
32
    solution_defguard_with_question_mark: "elixir.solution.defguard_with_question_mark",
33
    solution_defmacro_with_is_and_question_mark:
34
      "elixir.solution.defmacro_with_is_and_question_mark",
35
    solution_same_as_exemplar: "elixir.solution.same_as_exemplar",
36
    solution_list_prepend_head: "elixir.solution.list_prepend_head",
37
    solution_function_annotation_order: "elixir.solution.function_annotation_order",
38
    solution_no_integer_literal: "elixir.solution.no_integer_literal",
39
    solution_boilerplate_comment: "elixir.solution.boilerplate_comment",
40
    solution_todo_comment: "elixir.solution.todo_comment",
41
    solution_private_helper_functions: "elixir.solution.private_helper_functions",
42
    solution_unless_with_else: "elixir.solution.unless_with_else",
43
    solution_use_function_capture: "elixir.solution.use_function_capture",
44
    solution_deprecated_random_module: "elixir.solution.deprecated_random_module",
45
    solution_no_rescue: "elixir.solution.no_rescue",
46

47
    # Concept exercises
48

49
    # Basketball Website comments
50
    basketball_website_no_map: "elixir.basketball-website.no_map",
51
    basketball_website_get_in: "elixir.basketball-website.get_in",
52

53
    # Bird Count Comments
54
    bird_count_use_recursion: "elixir.bird-count.use_recursion",
55

56
    # Boutique Inventory Comments
57
    boutique_inventory_use_enum_sort_by: "elixir.boutique-inventory.use_enum_sort_by",
58
    boutique_inventory_use_enum_filter_or_enum_reject:
59
      "elixir.boutique-inventory.use_enum_filter_or_enum_reject",
60
    boutique_inventory_use_enum_map: "elixir.boutique-inventory.use_enum_map",
61
    boutique_inventory_use_enum_reduce: "elixir.boutique-inventory.use_enum_reduce",
62
    boutique_inventory_increase_quantity_best_function_choice:
63
      "elixir.boutique-inventory.increase_quantity_best_function_choice",
64

65
    # Boutique Suggestions Comments
66
    boutique_suggestions_use_list_comprehensions:
67
      "elixir.boutique-suggestions.use_list_comprehensions",
68

69
    # Chessboard Comments
70
    chessboard_function_reuse: "elixir.chessboard.function_reuse",
71
    chessboard_change_codepoint_to_string_directly:
72
      "elixir.chessboard.change_codepoint_to_string_directly",
73

74
    # Captains Log Comments
75
    captains_log_use_enum_random: "elixir.captains-log.use_enum_random",
76
    captains_log_do_not_use_enum_random: "elixir.captains-log.do_not_use_enum_random",
77
    captains_log_do_not_use_rand_uniform_real: "elixir.captains-log.do_not_use_rand_uniform_real",
78
    captains_log_use_rand_uniform: "elixir.captains-log.use_rand_uniform",
79
    captains_log_use_io_lib: "elixir.captains-log.use_io_lib",
80

81
    # Community Garden Comments
82
    community_garden_use_get_and_update: "elixir.community-garden.use_get_and_update",
83

84
    # Dancing Dots Comments
85
    dancing_dots_annotate_impl_animation: "elixir.dancing-dots.annotate_impl_animation",
86
    dancing_dots_do_not_reimplement_init: "elixir.dancing-dots.do_not_reimplement_init",
87

88
    # DNA Encoding Comments
89
    dna_encoding_use_recursion: "elixir.dna-encoding.use_recursion",
90
    dna_encoding_use_tail_call_recursion: "elixir.dna-encoding.use_tail_call_recursion",
91

92
    # File Sniffer Comments
93
    file_sniffer_use_bitstring: "elixir.file-sniffer.use_bitstring",
94

95
    # Freelancer Rates Comments
96
    freelancer_rates_apply_discount_function_reuse:
97
      "elixir.freelancer-rates.apply_discount_function_reuse",
98

99
    # German Sysadmin Comments
100
    german_sysadmin_no_string: "elixir.german-sysadmin.no_string",
101
    german_sysadmin_use_case: "elixir.german-sysadmin.use_case",
102

103
    # Gotta Snatch Em All Comments
104
    gotta_snatch_em_all_add_card_use_mapset_member_and_put:
105
      "elixir.gotta-snatch-em-all.add_card_use_mapset_member_and_put",
106
    gotta_snatch_em_all_trade_card_use_mapset_member_put_and_delete:
107
      "elixir.gotta-snatch-em-all.trade_card_use_mapset_member_put_and_delete",
108
    gotta_snatch_em_all_remove_duplicates_use_mapset_new:
109
      "elixir.gotta-snatch-em-all.remove_duplicates_use_mapset_new",
110
    gotta_snatch_em_all_remove_duplicates_use_enum_sort:
111
      "elixir.gotta-snatch-em-all.remove_duplicates_use_enum_sort",
112
    gotta_snatch_em_all_remove_duplicates_do_not_use_enum_uniq:
113
      "elixir.gotta-snatch-em-all.remove_duplicates_do_not_use_enum_uniq",
114
    gotta_snatch_em_all_extra_cards_use_mapset_difference_and_size:
115
      "elixir.gotta-snatch-em-all.extra_cards_use_mapset_difference_and_size",
116
    gotta_snatch_em_all_boring_cards_use_mapset_intersection:
117
      "elixir.gotta-snatch-em-all.boring_cards_use_mapset_intersection",
118
    gotta_snatch_em_all_boring_cards_use_enum_sort:
119
      "elixir.gotta-snatch-em-all.boring_cards_use_enum_sort",
120
    gotta_snatch_em_all_boring_cards_use_enum_reduce:
121
      "elixir.gotta-snatch-em-all.boring_cards_use_enum_reduce",
122
    gotta_snatch_em_all_total_cards_use_mapset_union_and_size:
123
      "elixir.gotta-snatch-em-all.total_cards_use_mapset_union_and_size",
124
    gotta_snatch_em_all_total_cards_use_enum_reduce:
125
      "elixir.gotta-snatch-em-all.total_cards_use_enum_reduce",
126
    gotta_snatch_em_all_split_shiny_cards_use_enum_sort:
127
      "elixir.gotta-snatch-em-all.shiny_cards_use_enum_sort",
128
    gotta_snatch_em_all_split_shiny_cards_use_string_starts_with:
129
      "elixir.gotta-snatch-em-all.shiny_cards_use_string_starts_with",
130

131
    # Guessing Game Comments
132
    guessing_game_use_default_argument: "elixir.guessing-game.use_default_argument",
133
    guessing_game_use_multiple_clause_functions:
134
      "elixir.guessing-game.use_multiple_clause_functions",
135
    guessing_game_use_guards: "elixir.guessing-game.use_guards",
136

137
    # High Score Comments
138
    high_score_use_module_attribute: "elixir.high-score.use_module_attribute",
139
    high_score_use_default_argument_with_module_attribute:
140
      "elixir.high-score.use_default_argument_with_module_attribute",
141
    high_score_use_map_update: "elixir.high-score.use_map_update",
142

143
    # High School Sweetheart Comments
144
    high_school_sweetheart_function_reuse: "elixir.high-school-sweetheart.function_reuse",
145
    high_school_sweetheart_multiline_string: "elixir.high-school-sweetheart.multiline_string",
146

147
    # Language List Comments
148
    language_list_do_not_use_enum: "elixir.language-list.do_not_use_enum",
149

150
    # Lasagna Comments
151
    lasagna_function_reuse: "elixir.lasagna.function_reuse",
152

153
    # Leap Comments
154
    leap_erlang_calendar: "elixir.leap.erlang_calendar",
155

156
    # Library Fees Comments
157
    library_fees_function_reuse: "elixir.library-fees.function_reuse",
158

159
    # Log Level Comments
160
    log_level_use_cond: "elixir.log-level.use_cond",
161

162
    # Name Badge Comments
163
    name_badge_use_if: "elixir.name-badge.use_if",
164

165
    # Need For Speed Comments
166
    need_for_speed_import_IO_with_only: "elixir.need-for-speed.import_IO_with_only",
167
    need_for_speed_import_ANSI_with_except: "elixir.need-for-speed.import_ANSI_with_except",
168
    need_for_speed_do_not_modify_code: "elixir.need-for-speed.do_not_modify_code",
169

170
    # Newsletter Comments
171
    newsletter_close_log_returns_implicitly: "elixir.newsletter.close_log_returns_implicitly",
172
    newsletter_log_sent_email_prefer_io_puts: "elixir.newsletter.log_sent_email_prefer_io_puts",
173
    newsletter_log_sent_email_returns_implicitly:
174
      "elixir.newsletter.log_sent_email_returns_implicitly",
175
    newsletter_send_newsletter_returns_implicitly:
176
      "elixir.newsletter.send_newsletter_returns_implicitly",
177
    newsletter_open_log_uses_option_write: "elixir.newsletter.open_log_uses_option_write",
178
    newsletter_send_newsletter_reuses_functions:
179
      "elixir.newsletter.send_newsletter_reuses_functions",
180

181
    # New Passport Comments
182
    new_passport_use_with: "elixir.new-passport.use_with",
183
    new_passport_use_with_else: "elixir.new-passport.use_with_else",
184
    new_passport_do_not_modify_code: "elixir.new-passport.do_not_modify_code",
185

186
    # Pacman Rules Comments
187
    pacman_rules_use_strictly_boolean_operators:
188
      "elixir.pacman-rules.use_strictly_boolean_operators",
189

190
    # Remote Control Car Comments
191
    remote_control_car_use_default_argument: "elixir.remote-control-car.use_default_argument",
192

193
    # RPG Character Sheet
194
    rpg_character_sheet_welcome_ends_with_IO_puts:
195
      "elixir.rpg-character-sheet.welcome_ends_with_IO_puts",
196
    rpg_character_sheet_run_uses_other_functions:
197
      "elixir.rpg-character-sheet.run_uses_other_functions",
198
    rpg_character_sheet_run_ends_with_IO_inspect:
199
      "elixir.rpg-character-sheet.ends_with_IO_inspect",
200
    rpg_character_sheet_IO_inspect_uses_label: "elixir.rpg-character-sheet.IO_inspect_uses_label",
201

202
    # RPN Calculator Inspection
203
    rpn_calculator_inspection_use_start_link: "elixir.rpn-calculator-inspection.use_start_link",
204

205
    # RPN Calculator Output
206
    rpn_calculator_output_try_rescue_else_after:
207
      "elixir.rpn-calculator-output.try_rescue_else_after",
208
    rpn_calculator_output_open_before_try: "elixir.rpn-calculator-output.open_before_try",
209
    rpn_calculator_output_write_in_try: "elixir.rpn-calculator-output.write_in_try",
210
    rpn_calculator_output_output_in_else: "elixir.rpn-calculator-output.output_in_else",
211
    rpn_calculator_output_close_in_after: "elixir.rpn-calculator-output.close_in_after",
212

213
    # Take A Number Comments
214
    take_a_number_do_not_use_abstractions: "elixir.take-a-number.do_not_use_abstractions",
215

216
    # Take A Number Deluxe Comments
217
    take_a_number_deluxe_use_genserver: "elixir.take-a-number-deluxe.use_genserver",
218
    take_a_number_deluxe_annotate_impl_genserver:
219
      "elixir.take-a-number-deluxe.annotate_impl_genserver",
220

221
    # Top Secret Comments
222
    top_secret_function_reuse: "elixir.top-secret.function_reuse",
223

224
    # Wine Cellar Comments
225
    wine_cellar_use_keyword_get_values: "elixir.wine-cellar.use_keyword_get_values",
226

227
    # Practice exercises
228

229
    # Accumulate Comments
230
    accumulate_use_recursion: "elixir.accumulate.use_recursion",
231

232
    # List Ops Comments
233
    list_ops_do_not_use_list_functions: "elixir.list-ops.do_not_use_list_functions",
234

235
    # Sieve Comments
236
    sieve_do_not_use_div_rem: "elixir.sieve.do_not_use_div_rem",
237
    #
238
    # Strain Comments
239
    strain_use_recursion: "elixir.strain.use_recursion",
240

241
    # Square Root Comments
242
    square_root_do_not_use_built_in_sqrt: "elixir.square-root.do_not_use_built_in_sqrt",
243

244
    # Two-fer Error Comments
245
    two_fer_use_default_parameter: "elixir.two-fer.use_default_param",
246
    two_fer_use_guards: "elixir.two-fer.use_guards",
247
    two_fer_use_string_interpolation: "elixir.two-fer.use_string_interpolation",
248
    two_fer_wrong_specification: "elixir.two-fer.wrong_specification",
249
    two_fer_use_function_level_guard: "elixir.two-fer.use_function_level_guard",
250
    two_fer_use_of_aux_functions: "elixir.two-fer.use_of_aux_functions",
251
    two_fer_use_of_function_header: "elixir.two-fer.use_of_function_header"
252
  ]
253

254
  for {constant, markdown} <- @constants do
255
    def unquote(constant)(), do: unquote(markdown)
9,052✔
256
  end
257

258
  def list_of_all_comments() do
259
    Enum.map(@constants, &Kernel.elem(&1, 1))
1✔
260
  end
261
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc