Add prefer_extracted_top_level_constant analyzer comment#2368
Add prefer_extracted_top_level_constant analyzer comment#2368SleeplessByte merged 3 commits intoexercism:mainfrom
Conversation
analyzer-comments/javascript/resistor-color-duo/prefer_extracted_top_level_constant.md
Outdated
Show resolved
Hide resolved
SleeplessByte
left a comment
There was a problem hiding this comment.
The suggestion reformats this to the markdown style guide we use for Exercism. Everything else looks pristine.
…ed_top_level_constant.md Co-authored-by: Derk-Jan Karrenbeld <derk-jan+github@karrenbeld.info>
Thanks, will take it into account in the future. 🙏 I commited your suggested changes. |
| const %{name} = %{value} | ||
|
|
||
| // the rest of your code below it | ||
| export const decodedValue = (...) |
There was a problem hiding this comment.
I just realised, this may NOT be the function declaration the student is using. It could be many forms, including:
export function decodedValue(...)Ideally, we inject the function signature the student actually used here. Do you think that's something you could add? We do it in another place, where it's using the source code to extract this part.
There was a problem hiding this comment.
Great suggestion. I added it, both here and on the analyzer pr. 🙌
|
@SleeplessByte Just a reminder of this PR, since the analyzer one has been merged. 😄 |
|
Woop woop |
Add
prefer_extracted_top_level_constantanalyzer comment to Resistor Color Duo on the Javascript track.The copy is heavily based on the existing copy for
prefer_top_level_constantin thegigasecondfile in the parent directory of the new file. I workshopped the copy I added a bit with ChatGPT with the hope of not overexplaining, but I am very open to all suggestions.Relates to (exercism/javascript-analyzer#127)
This is a companion to this PR.