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

Some Graph Problems Added #6

Closed
wants to merge 14 commits into from
Closed

Some Graph Problems Added #6

wants to merge 14 commits into from

Conversation

DBasu2610
Copy link

I added BFS, DFS, Dijkstra and Bellman-Ford in java

@iamwatchdogs iamwatchdogs self-requested a review September 29, 2024 14:43
@iamwatchdogs iamwatchdogs added the hacktoberfest Opted for hacktoberfest label Sep 29, 2024
@iamwatchdogs
Copy link
Contributor

Hi @DBasu2610, Please make sure you pass the linting check so that I can review it and merge the PR. You can find some help from review dog on file changes section and by reviewing the Displaying Diffs section in the output workflow.

Note

If you don't see any remarks on your code in the file changes section, make sure to turn on the annotations.
image

@iamwatchdogs
Copy link
Contributor

iamwatchdogs commented Sep 29, 2024

Please Read Till The End

@DBasu2610 I went thought you changes and I feel like you have mistaken my previous comment. I really appreciate you putting more effort about learning about review dog and trying to create a workflow from scratch for this repo, but you're fairly mistaken.

The CI workflow (linting workflows, to be specific) are implemented in such a way to help you find the right way to better format your code. And for your situation, the linter used for your Java source code uses review dog internally. I just pointed you that there were few linting checks that needed to be passed so that this PR could get merge. And I directed you to source that can help you format your source code so that your source code can get pass the liniting checks.

The review dog was supposed to show the part where the formatting when wrong and the linting workflow failed. All you had to do was goto the Files Changes section within this PR. Just as show below,

image
image

And I have also pointed you to the direct solution from the output log from the linting workflow by saying, "by reviewing the diffs",

image
image
image

I really hope this clears the miscommunications we just had and helps revise your actual PR submission.

@iamwatchdogs
Copy link
Contributor

Now that we're clear with our miscommunications, let's take a bit about the fixing things...

To start off, I suggest you to undo you recent changes i.e., building a npm env for review dog and creating a workflow for the review dog,

# reset your last two commits
git reset --hard HEAD~2

# foce push to your remote repo for the changes to reflect here
git push origin main -f

Now, with the help of the above mentioned source, format your source code, then commit & push them to here. So that we get pass linting checks and get your PR merged.

# after making your required changes
git add .

git commit -m "<proper-message>"

git push origin main

Important

Please follow the proper file structure provided to you from the beginning. In other words, maintain consistency of the file structure by placing in specific hierarchy i.e., not in SolvedProblems but in Solved-Problems.

Tip

Please do ping me up for any clarifications and please don't act upon assumptions. I'm always happy to help you out in clarifying things and discussing for better solutions. Thank you for your interest and patience...

@iamwatchdogs
Copy link
Contributor

Hi @DBasu2610, You're making great progress and did follow all of my instruction. But there are still some liniting checks needed to be passed. Please try to format your source code so that I could merge this PR.

If you find the review dogs's annotation on File Changes confusing, you can checkout the formatted version of the code on second source i.e., reviewing the diffs.

image

Please do ping if you're facing issue, even after that...

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the file that's causing the linting to fail, please format the code with provided sources.

Copy link
Contributor

Choose a reason for hiding this comment

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

There was no need to remove you source code @DBasu2610, you could have formatted it. The linting checks failed due to indentation and an missing curly brace. And I directed right towards the answer i.e., reviewing diffs. It has the formatted code.

I know the linting workflow might annoy you but they're the ones that help you write clean code following standards. Even after hint the direct solution, you proceed to remove the file and I'm saying it was unnecessary. You could have copy-pasted the solution, removing things won't make it any better.

The solution was here along... You could have asked me even for clarifications, but yet you proceeded on your own...
image

I gave you the solution and it's up to you whether to use it or not...

Copy link
Author

Choose a reason for hiding this comment

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

Yes I added it back and also formatted it, but it still is having linting issues

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you source code is getting reformatted after pasting the formatted code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Look here, there are the things that need to changes...

image
image
image

Copy link
Contributor

@iamwatchdogs iamwatchdogs Sep 30, 2024

Choose a reason for hiding this comment

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

Try directly copying from the diffs and pasting them right in the GitHub. That should work...

like this,
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Now this file is failing the linting checks. Please use to review dog's annotations or diffs from the workflow to resolve the linting checks...

@iamwatchdogs
Copy link
Contributor

Please refer to on of the outdate comment on file DFS.java.

#6 (comment)

@iamwatchdogs
Copy link
Contributor

@DBasu2610 You are doing great by learning how to format your code, but as I said earlier all the solutions are given to your... All the formatted code is present within "Showing Diffs & exit" section on the linting workflow, so please check out for file too...

@DBasu2610
Copy link
Author

I redid the format of DFS.java.

@iamwatchdogs
Copy link
Contributor

Please refer back to this conversation.

@iamwatchdogs
Copy link
Contributor

@DBasu2610, Try copy-pasting the formatted code from "Show Diffs and exit" as mentioned in the previous conversation.

copied it from "show diffs and exit" and just pasted it over here
@DBasu2610
Copy link
Author

I did copy the formatted code from "show diffs and exit" and pasted it directly

@DBasu2610
Copy link
Author

Check if it works now, and thank you for being so patient everytime.

@iamwatchdogs
Copy link
Contributor

@DBasu2610 You are the more patient one... Many people who have closed it or leave it away... But you're still willing to work on it despite facing this much issues...

@iamwatchdogs
Copy link
Contributor

iamwatchdogs commented Oct 1, 2024

@DBasu2610 All the files have linting issue. So, Please take help of "Show Diffs" section and updated the file content within GitHub itself.

I believe the reason for failing linting checks is due to soo many formatting issue that crossed the limit which is throwing the error on workflow. So, if you could update all the file content with formatted code with help of "Show Diffs", then even if there are formatting issue they might not hit the limit and checks workflow checks might pass.

I hope you understand what I'm trying to say... If anything is not clear to you, please ping me back with your question.

@DBasu2610
Copy link
Author

See, it still didn't work :)

@iamwatchdogs
Copy link
Contributor

@DBasu2610 Have you formatted all of the java source code files ?

Because currently, this is happening...

sum( no_of_linting_checks( [ list of your java files ] ) ) >= error_limit 

And formatting all of the java source code file, can do this,

sum( no_of_linting_checks( [ list of your java files ] ) ) < error_limit

What I'm suggest you is to format all of them, so that cumulatively they don't hit the limit and pass the checks... Please when I mention all of the java source code file it mean BFS.java, BellmanFord.java, Dijkstra.java.

@DBasu2610
Copy link
Author

DBasu2610 commented Oct 3, 2024 via email

@DBasu2610 DBasu2610 closed this Oct 3, 2024
@iamwatchdogs
Copy link
Contributor

Hi @DBasu2610, Sorry for late reply.

Yes, you can close it on your own and yoy have already did. But note that, linting checks might still fail if they are not formatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Opted for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants