-
Notifications
You must be signed in to change notification settings - Fork 234
Add customize output color enhancement #654
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
Conversation
Supress Warnings in travis Supress Warning in Travis PowerShell#2 Test for travis Add Comment XML for travis Add Comment for Testing
Nice work @KeroroLulu 🎉 looking forward to reviewing this! |
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.
Thank you so much for taking this one @KeroroLulu! A couple minor requests due to some differences in this project versus Core.
/// | ||
/// | ||
/// </summary> | ||
public class ConsoleColorProxy |
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.
This should be internal class ConsoleColorProxy
since the only intended way to access it is via the PSObject. The empty documentation comment can then be removed as well
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.
@SeeminglyScience Sorry I delete my comments in your review, afterwards I notice that the error I get with travis was from public members. I didn't notice that it work with internal members. And when I pushed that change AppVeyor worked I don't know why it was stuck for 20 minute.
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.
AppVeyor and Travis sometimes have issues (not our issues) and it's just a matter of restarting the build and it works. 😀
/// <summary> | ||
/// | ||
/// </summary> | ||
public ConsoleColorProxy(EditorServicesPSHostUserInterface hostUserInterface) |
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.
This should be internal ConsoleColorProxy(EditorServicesPSHostUserInterface hostUserInterface)
, the empty documentation comment can then be removed as well
/// </summary> | ||
public ConsoleColor ErrorForegroundColor | ||
{ | ||
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
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.
All of the diagnostic suppressions (SuppressMessage
) can be removed since we don't have the same analyzers on the project
/// <summary> | ||
/// | ||
/// </summary> | ||
public static ConsoleColor BackgroundColor |
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.
All of the color properties here can be internal
, the empty documentation comments can then be removed as well.
{ | ||
get; | ||
set; | ||
} |
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.
This should follow the same style as below (e.g. public static ConsoleColor BackgroundColor { get; set; }
)
@@ -6,6 +6,7 @@ | |||
using Microsoft.PowerShell.EditorServices.Session; | |||
using Microsoft.PowerShell.EditorServices.Utility; | |||
using System; | |||
using System.Diagnostics.CodeAnalysis; |
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.
This can be removed after the SuppressMessage
attributes are removed.
I added all internal class and suppress all the SuppressMessage. But I can't remove the empty documentation, the analysis of PowerShell Editor Services doesn't let it pass. I tried to add the suppress warning in it but it doesn't work as well. So I had to add all documentation.
Sorry I didn't notice that was only for public members until I read the error again.
@KeroroLulu do you think you could upload a picture of it working? I'm really curious to see it 😃 |
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!! 🎉
Awesome work @KeroroLulu! Thank you so much for contributing 😀
You're going to make a lot of folks happy with this change because VSCode needed a way to change colors of errors so that when people give presentations there's enough contrast.
I will wait to hear what @SeeminglyScience has to say about your revisions 😁
|
||
/// <summary> | ||
/// | ||
/// </summary> |
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.
Can you either remove these summaries or add like
"The ForegroundColor for Errors"
etc.
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.
I will add text, I think that your configuration of travis doesn't accept warning from XML documentation for public members
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.
sounds good!
|
Looks good to me! |
verified this on macOS 😁 |
I'm on MacOS too x) |
Changes look great! Thanks again this is a big help :) |
Should I squash my commit ? |
Merged 😄 Thanks again!! I tweeted about the PR here: |
@KeroroLulu Thank you very much for this improvement! This is something that has been needed in VS Code for a long time! 😀 |
It will be available in the next release which I'm going to try to get out next week :) |
With this, if the user change his PrivateData's color properties it will be print with the color that the user choose.
Edit
Sorry I touched
.travis.yml
because I had some problem with travis but finally it didn't change. To resolve this problem I just put XML comment, that was from the copy/past from PowerShell repositorie.fixes #651