Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format the output of code examples consistently across exercises/concepts #2202

Closed
andrerfcsantos opened this issue Apr 25, 2022 · 1 comment
Labels
x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept Work on Concepts x:module/concept-exercise Work on Concept Exercises x:module/practice-exercise Work on Practice Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts)

Comments

@andrerfcsantos
Copy link
Member

andrerfcsantos commented Apr 25, 2022

After some discussion in #2156, it was decided that to show the output of code examples, we must follow a standard format across exercises and concepts. The agreed format is to put the output of a piece of code as a comment after the code. The comment should start with an arrow =>. It looks like this:

NeedsLicense("car")
// => true

Examples that have some specific reason to include a print statement should have the following format:

result := NeedsLicense("car")
fmt.Println(result)
// Output: true

Scope

The idea is to use this format across all exercises. Some exercises are not following this format right now, and we'll use this issue as a general tracking issue for PRs addressing this issue.

Contributing to this issue

If you'd like to contribute to this issue, feel free to open PRs. PRs addressing this issue for a single exercise or just a few exercises or concepts are welcome - you don't need to fix this across all instances before opening a PR.

Related PRs

@andrerfcsantos andrerfcsantos added good first issue x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept Work on Concepts x:module/concept-exercise Work on Concept Exercises x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) x:size/small Small amount of work labels Apr 25, 2022
eklatzer added a commit to eklatzer/exercism-go that referenced this issue Jun 7, 2022
makon57 added a commit to makon57/go that referenced this issue Jun 22, 2022
Fixed exercism#2202 edited and added "=>" instead of "Output:" according to specifications in issue description
 Please enter the commit message for your changes. Lines starting
Ilingu added a commit to Ilingu/exercism-go-forked that referenced this issue Jun 24, 2022
Ilingu added a commit to Ilingu/exercism-go-forked that referenced this issue Jun 24, 2022
@junedev
Copy link
Member

junedev commented Sep 17, 2022

Judging from #2472, it looks to me like most files are fixed by now. To avoid more PRs like #2472 that go in the wrong direction, I will close this issue for now. If we find more concrete places that need fixing, we can re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept Work on Concepts x:module/concept-exercise Work on Concept Exercises x:module/practice-exercise Work on Practice Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

No branches or pull requests

2 participants