Skip to content

Adding -Continue parameter for Show-Karma - #317

Closed
arefg wants to merge 17 commits into
PowerShellOrg:masterfrom
arefg:master
Closed

arefg wants to merge 17 commits into
PowerShellOrg:masterfrom
arefg:master

Conversation

@arefg

@arefg arefg commented Oct 29, 2019

Copy link
Copy Markdown

I think it would be a good idea to have a parameter for Show-Karma cmdlet to be able to not only open the PSKoans directory but also jump to the failing topic and the exact line on that file.

I've added a parameter named OpenFile with an alias (Continue), this parameter uses the $Results.Meditation to extract the path and line number of the failing topic.

Maybe there is a better way of extracting the file path and achieving the same result (by RegEx or other means) but it's working great for VS Code and I think we can change it a little bit to detect the PowerShell ISE and at least open the failing topic file or at best jump to the failing line as well.

With this, we can continue our journey of enlightenment 😄 by just typing:

Show-Karma -Continue

@vexx32 vexx32 added Category-Module Pertaining to the module's functionality itself. Category-Tests ✅ Pertaining to tests for the module functions. PR-Needs-Review 🔍 Let's take a closer look! labels Oct 29, 2019

@vexx32 vexx32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I love this idea! I've been toying with it for a while, but this is the first time I've had a look at the code that might be able to do it.

I think we can do this a little more neatly, but this is on the right track overall! 💖 😊

Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
@vexx32 vexx32 added PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. and removed PR-Needs-Review 🔍 Let's take a closer look! labels Oct 29, 2019
@arefg
arefg requested a review from vexx32 November 8, 2019 18:11
@vexx32 vexx32 added PR-Needs-Review 🔍 Let's take a closer look! and removed PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. labels Nov 8, 2019
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated

@vexx32 vexx32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome! I think we're getting pretty close here, that looks pretty good. One minor concern with the platform selection and then just mainly style comments for the switch statement. 🙂

Comment thread PSKoans/Public/Get-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
arefg and others added 5 commits November 9, 2019 00:38
@arefg
arefg requested a review from vexx32 November 8, 2019 22:24
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
@vexx32 vexx32 added PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. and removed PR-Needs-Review 🔍 Let's take a closer look! labels Nov 20, 2019
@arefg
arefg requested a review from vexx32 November 26, 2019 19:58
vexx32
vexx32 previously approved these changes Nov 26, 2019

@vexx32 vexx32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fantastic!

Thank you so much! Appreciate all your patience on this, I know I can be a bit picky. 😊 💖

@arefg

arefg commented Nov 26, 2019

Copy link
Copy Markdown
Author

Hey Joel, I know this is a stupid question 😄 but since I'm new to all these Github stuff, what should I do now? Should I click on "Close and comment"? 😛

@vexx32 vexx32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Last minor thing and then you'll just need to update the tests to expect this behaviour so they stop failing. 🙂 💖

Comment thread PSKoans/Public/Show-Karma.ps1 Outdated
@vexx32

vexx32 commented Nov 26, 2019

Copy link
Copy Markdown
Collaborator

@arefg once you update the tests and everything in the CI is green I'll merge the PR, no worries :)

Co-Authored-By: Joel Sallow (/u/ta11ow) <[email protected]>
@arefg
arefg dismissed stale reviews from vexx32 via 0c38bf9 November 26, 2019 20:09
@vexx32 vexx32 mentioned this pull request Jan 14, 2020
5 tasks
@vexx32

vexx32 commented Jan 15, 2020

Copy link
Copy Markdown
Collaborator

I'll continue this in #346 for now. Thanks for the great work so far! 😊 💖

@vexx32 vexx32 closed this Jan 15, 2020
@vexx32 vexx32 removed the PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category-Module Pertaining to the module's functionality itself. Category-Tests ✅ Pertaining to tests for the module functions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants