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

Add LPUSH, RPUSH, LPOP, RPOP, LLEN, LMOVE, LTRIM and tests #100

Merged
merged 14 commits into from
Feb 16, 2023
Merged

Conversation

cchriss123
Copy link
Contributor

@cchriss123 cchriss123 commented Feb 13, 2023

Methods still need to be called correctly from main or somewhere else.
#101

@cchriss123 cchriss123 linked an issue Feb 13, 2023 that may be closed by this pull request
Copy link
Contributor

@safstromo safstromo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, so much code :D

Screenshot from 2023-02-14 08-48-05
This test is failing, assertEquals("$3\r\n(nil)\r\n", nilTest); $3 should be $5 since (nil) is 5 letters.

Screenshot from 2023-02-14 09-37-11

Screenshot from 2023-02-14 09-37-31
Screenshot from 2023-02-14 09-38-52

I think you need to fix lmove, how im reading the documentation val1 should be push to the front of the list?

@cchriss123
Copy link
Contributor Author

cchriss123 commented Feb 14, 2023

@safstromo
Great catch on the nil Test.
I forgot to update the test when i found the error in my code last night.
I will have to look into the LMOVE closer but in the picture you provided you are comparing a LEFT to RIGHT with a RIGHT to LEFT if im not mistaken.

@safstromo
Copy link
Contributor

safstromo commented Feb 14, 2023

@safstromo Great catch on the nil Test. I forgot to update the test when i found the error in my code last night. I will have to look into the LMOVE closer but in the picture you provided you are comparing a LEFT to RIGHT with a RIGHT to LEFT if im not mistaken.

Your right my mistake! Move along nothing to see here xD

safstromo
safstromo previously approved these changes Feb 14, 2023
Copy link
Contributor

@safstromo safstromo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

RehasLiamsi
RehasLiamsi previously approved these changes Feb 14, 2023
Copy link
Contributor

@RehasLiamsi RehasLiamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Contributor

@Viktormes Viktormes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should rename the methods. Should be using the Java Naming Conventions.

@safstromo
Copy link
Contributor

You still have some code smells :)

@sonarcloud
Copy link

sonarcloud bot commented Feb 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

93.2% 93.2% Coverage
0.0% 0.0% Duplication

@cchriss123 cchriss123 removed the request for review from jonathanjonathan001 February 15, 2023 12:05
@cchriss123 cchriss123 removed the request for review from Anton20HD February 15, 2023 12:05
Copy link
Contributor

@BobHogvall BobHogvall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really coming along great! Just a small reminder to not forget to look at sonarCloud! there are still a few code smells from what i can see.
Good work Christofer!

RobertMili
RobertMili previously approved these changes Feb 15, 2023
The smell is not a problem since index is not used
@sonarcloud
Copy link

sonarcloud bot commented Feb 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.8% 94.8% Coverage
0.0% 0.0% Duplication

@jLereback jLereback added this pull request to the merge queue Feb 16, 2023
Merged via the queue into main with commit 5da625f Feb 16, 2023
@jLereback jLereback deleted the 17-lists branch February 16, 2023 08:10
@kappsegla kappsegla added the enhancement New feature or request label Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lists
8 participants