-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
1 new exercise: protein-translation #125
Conversation
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
Forgot config.json once again, but it has been fixed in my branch. |
I've sent a pile of comments via the forum. See https://forum.exercism.org/t/requirements-for-cut-and-proof-ci-cob-files/10818 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested changes are to make lines consistent throughout.
exercises/practice/protein-translation/bin/fetch-cobolcheck.ps1
Outdated
Show resolved
Hide resolved
exercises/practice/protein-translation/src/protein-translation.cob
Outdated
Show resolved
Hide resolved
@ErikSchierboom still have the appveyor issue |
We could stand to remove some of the |
@kapitaali tests are failing ... but you knew that |
That makes it appear like there is a syntax error somewhere in protein-translation.
Feel free to try and fix that, I don't have much time for that. |
Righto. I did get feedback from @GitMensch about that. See #126 (comment) but I'll see what I can do about it in the meantime |
The compiler error is being caused by
therefore, remove that from the CUT file and explicitly INITIALIZE WS-PROTEIN at the top of the relevant paragraphs. |
This passes all the tests.
|
If this is also about good COBOL, I'd recommend to drop the The complete "fall through" would commonly be seen as bad style. It may should be adjusted to instead of TRANSLATE-CODON.
INITIALIZE WS-PROTEIN WS-ERROR WS-CODON WS-AMINOACID.
MOVE WS-INPUT TO SLICES.
SET SLICED TO 1.
PERFORM WITH TEST BEFORE UNTIL SLICE(SLICED) = SPACE
MOVE SLICE(SLICED) TO WS-CODON
PERFORM CHECK-CODON
SET SLICED UP BY 1
END-PERFORM.
IF WS-AMINOACID = "ERROR"
MOVE "Invalid codon" TO WS-ERROR
ELSE
MOVE WS-AMINOACID TO WS-PROTEIN.
EXIT PARAGRAPH. be: TRANSLATE-MAIN.
INITIALIZE WS-PROTEIN WS-ERROR WS-CODON WS-AMINOACID.
MOVE WS-INPUT TO SLICES.
PERFORM TRANSLATE-CODON.
IF WS-AMINOACID = "ERROR"
MOVE "Invalid codon" TO WS-ERROR
GOBACK.
MOVE WS-AMINOACID TO WS-PROTEIN.
PERFORM TRANSLATE-RNA.
GOBACK.
TRANSLATE-CODON.
SET SLICED TO 1.
PERFORM WITH TEST BEFORE UNTIL SLICE(SLICED) = SPACE
MOVE SLICE(SLICED) TO WS-CODON
PERFORM CHECK-CODON
SET SLICED UP BY 1
END-PERFORM. |
it wasn't about good COBOL last time I submitted exercises, the only requirement was that the code passes the tests GOBACKs supposedly messed up something with testing, so I removed them and used EXIT PARAGRAPH for good COBOL I would appreciate a style guide |
That is still 100% the case. |
As noted: The rest is a style question and in COBOL those are commonly set fixed in the team/working place (you will find a bunch of those heavily disagreeing; and there may be one where the fall-through is preferred [I've so far just met styles where this was allowed within sections, but not for the whole program]). |
We've found that GOBACK and STOP RUN confuse COBOLCHECK |
I'm not sure what you reference with COBOLCHECK, but it seems that part is buggy and may should be improved? |
FYI https://openmainframeproject.org/projects/cobol-check/ I'm sure the author would appreciate help improving the tool |
As asked in the forum, How do I rebase #125 so that it uses the new setup? I thought this was what was needed
|
Co-authored-by: Victor Goff <[email protected]>
….cob Co-authored-by: Victor Goff <[email protected]>
* Add file patterns * Update files keys
* Pre-fetch cobolcheck * Use home dir * Fetch cobolcheck on windows * Allow for pre-installed cobolcheck
* from appveyor to sourceforge * different server * 7z * 7z * yaml issue fixed * slashes * 7z oddities * directories * $HOME ? * atbash tweak * cache management fix * commented out extraneous DISPLAY in proof.ci.cob files * eol issue * line ends fixed * strangenesses * SPACE instead of "" in CUT files * Trim additional line * Debug * Try simplify environment variables * More debugging * More tweaking * Fix path * Fix path * Fix path * Fix env * Streamline * eof is lf * acronym * acronym * sqrt * Fix paths * Fix cache path --------- Co-authored-by: Erik Schierboom <[email protected]>
* Try fix caching * Try fix cache path * Try include cobolcheck * Try include cobolcheck * Use home dir * Use home dir
function all intrinsic on its own line
* Try install * CONCAT -> CONCATENATE * CONCATENATE is two-fer --------- Co-authored-by: Bruce Axtens <[email protected]>
24b25eb
to
3291be3
Compare
@kotp all the CI passes. Lots of hard work done by @ErikSchierboom |
@ErikSchierboom why can't I merge this? |
A maintainer has to approve it first |
Adding 1 new exercise to COBOL track: protein-translation
Based on last pull request attempt, all GOBACKs have been removed from code.