-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[fxcop] Fixes for Wox.Plugin (1of3) #7457
Merged
avneet-kr
merged 31 commits into
microsoft:master
from
avneet-kr:FxCopAnalyzer_WoxPlugin
Oct 26, 2020
Merged
[fxcop] Fixes for Wox.Plugin (1of3) #7457
avneet-kr
merged 31 commits into
microsoft:master
from
avneet-kr:FxCopAnalyzer_WoxPlugin
Oct 26, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pulling in changes from microsoft/PowerToys
Merging in changes from microsoft/master
avneet-kr
force-pushed
the
FxCopAnalyzer_WoxPlugin
branch
from
October 22, 2020 01:26
c422898
to
b24dc74
Compare
avneet-kr
changed the title
[fxcop] Fixes for Wox.Plugin
[fxcop] Fixes for Wox.Plugin (1of3)
Oct 22, 2020
…304: Specify CultureInfo)
…uments of public methods)
… (CA1054: URI parameters should not be strings)
…: Rethrow to preserve stack details)
…nKeywords (CA2227: Collection properties should be read only)
…ightData (CA2227: Collection properties should be read only)
… for Result::SubTitleHighlightData (CA2227: Collection properties should be read only)
… for ResultUpdatedEventArgs::Results (CA2227: Collection properties should be read only)
…itialize unnecessarily)
…rivate set (CA1819: Properties should not return arrays)
…terfaces) - Removed IFeatures interface and references - Renamed IFeatures.cs to IContextMenu.cs according to guidelines
…clarity / CA1304: Specify CultureInfo)
This reverts commit f721c2f.
avneet-kr
force-pushed
the
FxCopAnalyzer_WoxPlugin
branch
from
October 22, 2020 04:29
e9c258f
to
fe7aad3
Compare
This was referenced Oct 22, 2020
@@ -51,9 +52,10 @@ public static void Copy(this string sourcePath, string targetPath) | |||
#pragma warning restore CS0168 // Variable is declared but never used | |||
{ | |||
#if DEBUG | |||
throw e; | |||
throw; | |||
#else |
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.
nit: I don't think we need these #if DEBUG throw statements.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ryanbodrug-microsoft
approved these changes
Oct 26, 2020
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
TobiasSekan
pushed a commit
to TobiasSekan/PowerToys
that referenced
this pull request
Oct 28, 2020
* Added CultureInfo (CA1307: Specify StringComparison for clarity / CA1304: Specify CultureInfo) * Check arguments and throw ArgumentNullException (CA1062: Validate arguments of public methods) * Changed url parameter from string to System.Uri and added null checks (CA1054: URI parameters should not be strings) * Rethrow exception without specifying the exception explicitly (CA2200: Rethrow to preserve stack details) * Changed from Collection property to methods for PluginMetadata::ActionKeywords (CA2227: Collection properties should be read only) * Changed from Collection property to methods for Result::GetTitleHighlightData (CA2227: Collection properties should be read only) * Made Collection property read-only and added parameter in constructor for Result::SubTitleHighlightData (CA2227: Collection properties should be read only) * Made Collection property read only and added parameter in constructor for ResultUpdatedEventArgs::Results (CA2227: Collection properties should be read only) * CA1507: Use nameof in place of string * Removed initialization for ThemeManager::_disposed (CA1805: Do not initialize unnecessarily) * Changed Query::Terms array property to ReadOnlyCollection and added private set (CA1819: Properties should not return arrays) * CA1060: Move P/Invokes to NativeMethods class * CA1806: Do not ignore method results * CA2101: Specify marshaling for P/Invoke string arguments * Removed unnecessary empty interface IFeatures (CA1040: Avoid empty interfaces) - Removed IFeatures interface and references - Renamed IFeatures.cs to IContextMenu.cs according to guidelines * Added comments for CultureInfo (CA1307: Specify StringComparison for clarity / CA1304: Specify CultureInfo) * Added localization for Wox.Plugin and localized strings in FilesFolders.cs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This PR includes fixes for most Fxcop errors from Wox.Plugin.
Note: Since this 1of3 PRs, I will add the commit to enable Fxcop for Wox.Plugin in the separate 3rd PR
PR Checklist
Info on Pull Request
Changes included:
Validation Steps Performed
All changes were tested by building and running all unit tests