-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix: A few structural changes to the repository and added missing tests and fixed some failing tests. #325
Conversation
…c directory to modular for better import naming; added extended gcd; added modular inverse
…erator as it is actually not the best practice to dynamically generate your tests.
… the contributions that I've made in the past
Let's switch to |
@siriak I looked into it and the go team have archived golint for some reason (about 4 months ago) so its highly unlikely that they will make progress in it. There are other tools that I can look at, would you like me to? |
…ings for staticcheck tools;
https://pkg.go.dev/golang.org/x/lint is deprecated and frozen. |
Yeah, and unfortunately there is no stand in replacement for it. The staticcheck github-action seems to be a good alternative but haven't used it personally so not sure. |
My vote would be that we stick with https://github.com/golangci/golangci-lint which continues to be well maintained. |
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.
LGTM
@tjgurwara99 could you resolve the conflicts so that I could merge? |
bb3a39f
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.
LGTM, thanks!
Apologies for the big PR, I tried to make minimal changes but one change/fix lead to another broken thing so... here we are.
I have made a few changes to the repo and added RSA algorithm that was failing tests and had an incorrect implementation.
This is a big PR because I have changed some of the directory structure inside the repo. For example, it made more sense to call the modular exponentiation function as
modular.Exponentiation
thanmodular_arithmetic.ModularExponentiation
which was done before (by me). Similar thing applies tocipher
directories different ciphers.I have also added a few algorithms that were needed for the RSA algorithm in the relevant directories, example
modular.Inverse
.I also noticed that the sorting algorithms tests were not set up correctly and because of which every test passed even though the algorithms were incorrect, example
QuickSort
andRadixSort
. Unfortunately however, because of the way I have fixed it, it has resulted ingolangci-lint
failing because of one of their open issue. I can fix it by changing the implementation but I think we should try and stick to go's ecosystem and use the tools provided by go team, that isgolint
.golint
is much more stricter than golangci-lint in most cases (as far as I have seen and I think its a good thing). These tools are actually more strict and have a better overall effect on other go tools. But if the maintainers want me to fix it as it is, I will fix it - albeit the code will be a bit uglier.Closes: #152
Closes: #303
The following are open issues that are actually fixed adding it here so that merge automatically closes these issues
Closes: #37
by #266
Closes: #269
by #324
Closes: #36
by #266