Much-Assembly-Required icon indicating copy to clipboard operation
Much-Assembly-Required copied to clipboard

Code style & refactor

Open simon987 opened this issue 6 years ago • 12 comments

Fix Issues in https://www.codefactor.io/repository/github/simon987/much-assembly-required/issues

Feel free to make a PR to fix any of the issues.

simon987 avatar Apr 03 '19 22:04 simon987

Hello, I wanna work in this, how can I help?

matias9477 avatar Apr 16 '19 23:04 matias9477

@matias9477 You can visit the link above, there should be documentation on how to fix each issue

simon987 avatar Apr 16 '19 23:04 simon987

Hello again, I just made a pull request for a couple of minor fixes, this is my first time helping in a free software project. Thank you for being nice and I hope I can help a little more in the future.

matias9477 avatar Apr 18 '19 17:04 matias9477

@matias9477 Thank you for you help and welcome to open source world :)

If you need any help don't hesitate to reach out (There is also a Slack channel)

simon987 avatar Apr 18 '19 19:04 simon987

Hi, @simon987. Like matias, I also made some similar changes to the code and submitted a PR. This is also my first time trying to contribute to open source project. Hope this could help you and I am really happy to help with the project in the future. BTW, the codefactor is fantastic, thanks for introducing such an amazing website for me as well. Thanks in advance

cheeselover1 avatar May 31 '19 06:05 cheeselover1

I am refactoring some things in editor.js and found some code I'm not understanding. Am I correct to say that && text.indexOf("o") === -1 && text.indexOf("0e") !== 0 located here is unnecessary?

I guess I just don't understand what they are testing for, but my thought is that any whole base-10 number or base-16 number is immediate, and that is tested in the first 2 conditions of !isNaN(Number(text)) && Number(text) === Math.floor(Number(text)).

AstronautEVA avatar Oct 06 '19 19:10 AstronautEVA

@jacquej96 Hi, Javascript allows octal ("o" prefix) and other kinds of numbers (I dont remember what "0e" is for) that the Java assembler does not understand, if we don't check for those, the code will produce an error when it is uploaded but the editor will not display it.

simon987 avatar Oct 06 '19 19:10 simon987

oh ok, good to know thanks!

AstronautEVA avatar Oct 06 '19 19:10 AstronautEVA

Are there tests written for editor.js? Specifically the function getOperandType? I've refactored that function but cannot seem to find tests for it.

If there truly are no tests, should I write them and do a PR for that before submitting my PR for the refactor?

AstronautEVA avatar Oct 07 '19 00:10 AstronautEVA

@jacquej96 HI, There are no tests for client-side code. You can add the tests in the same PR (this is not necessary, since you would also need implement the initial test suite code)

simon987 avatar Oct 07 '19 00:10 simon987

Hello, I've just started taking a look at this project and opened a small PR for some style issues. Let me know if there's something else I can add to this PR.

adamrmelnyk avatar Oct 17 '19 03:10 adamrmelnyk

Hi, I'm new to open-source contributions, but would love to get involved with this issue. I have taken a look at the codefactor.io link and am working on opening a PR now.

evanSpendlove avatar Nov 01 '19 20:11 evanSpendlove