Arjun Balgovind
1b598ad87e
[Localization] Move PowerToys Run string resources from xaml files to resx ( #6165 )
...
* Removed xaml files, added resx file and removed references for PowerLauncher project
* Added resx file for wox.plugin
* Moved Calculator resources to resx
* Migrated resources for Folder and Indexer plugins
* Migrated resources for Program and Shell plugin
* Migrated resources for URI and Window Walker
* Removed GetTranslation, tests need to be refactored
* Removed internationalization classes
* Removed Wox.Core.Resource references
* Fixed Programs plugin tests
* Fixed tests
* Removed language xaml files from installer
* Added locProject.json files
* Fixed resource not found error
* Reverted addition of resx file for Wox.Plugin
2020-09-02 15:24:59 -07:00
Divyansh Srivastava
9c6b2c3e81
Display colored icons for packaged apps ( #5923 )
...
* Added wox code for tiling
* nit fixes in plating function
* Added feature to plate images based on theme
* Improve code readability
* added altform based paths
* Error handling in fetching logo
* Re add fix sequence empty exception on calling max in program plugin
* Move path and logo setting code to setIcon function
* Add corner radius to packaged apps icon
* Revert "Add corner radius to packaged apps icon"
This reverts commit 9be496e662
.
2020-08-21 13:39:08 -07:00
Clint Rutkas
d055ba1c3b
whitespace forced changes ( #6002 )
2020-08-17 10:00:56 -07:00
Clint Rutkas
e0a1b478a1
Program plugin fully on stylecop ( #5964 )
2020-08-14 12:46:23 -07:00
Clint Rutkas
913615f1c2
more braces and whitespace style errors ( #5951 )
2020-08-14 09:22:12 -07:00
Clint Rutkas
38b0d427f8
Fix all file naming tweaks ( #5945 )
2020-08-13 15:31:32 -07:00
Clint Rutkas
e02977edc0
Whitespace and type fixes ( #5917 )
2020-08-13 15:31:14 -07:00
Clint Rutkas
95e82ca359
[stylecop] program plugin/unit test first pass ( #5908 )
...
* initial pass
* multiple whitespace fixes
2020-08-12 11:46:11 -07:00
ryanbodrug-microsoft
ac10c988b9
Enable Static Analysis on programs plugin ( #5847 )
...
* Removing unused ProgramSettings constructor paramaters.
* Fix for:
Severity Code Description Project File Line Suppression State
Error CA1829 Use the "Count" property instead of Enumerable.Count(). Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 182 Active
Severity Code Description Project File Line Suppression State
Error CA1827 Count() is used where Any() could be used instead to improve performance. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Views\ProgramSetting.xaml.cs 287 Active
* Fixes for CA1031:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019
* More fixes(Suppression) for CA1031 (Catching base exception)
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1031?view=vs-2019
* Fix for nested types being externally visible. CA1034
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019
* Fix for CA1028 If possible, make the underlying type of Hresult System.Int32 instead of uint. Microsoft.Plugin.Program C:\Repos\PowerToys\src\modules\launcher\Plugins\Microsoft.Plugin.Program\Programs\UWP.cs 236 Active
* Fix for CA2227 Collection properties should be readonly.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019
Fix rror CA2211 Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019
* CA2208: Instantiate argument exceptions correctly
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2208?view=vs-2019
* Win32.cs Static analysis fixes:
CA2200: Rethrow to preserve stack details
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2200?view=vs-2019
CA1825: Avoid zero-length array allocations
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1825?view=vs-2019
CA2211: Non-constant fields should not be visible
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2211?view=vs-2019
* More Win32.cs static analysis fixes:
CA1307: Specify StringComparison
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019
Verifying query is not null before using it.
CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019
CA1305: Specify IFormatProvider
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019
* UWPApplication.
CA2007: Do not directly await a Task
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2007?view=vs-2019
* Error CA2010 Consume the hresult returned by method 'Microsoft.Plugin.Program.Programs.AppxPackageHelper.IAppxManifestApplication.GetStringValue(string, out string)' and call Marshal.ThrowExceptionForHR.
Note: CA2010 has been removed from future FXCop versions as it can provide incorrect advice for methods that don't return hresult (possibly when [PreserveSig] has been incorrectly labeled.) I've verified the methods in question do still return hresults.
* More fixes for
Error CA2010 Consume the hresult returned by method and call Marshal.ThrowExceptionForHR.
* Fixes for:
Error CA2000 Call System.IDisposable.Dispose on object created before all references to it are out of scope.
* Suppress CA1031:Do not catch general exception types
* Fixes for
Error CA1034 Do not nest type ...
* Fixing Unit tests that were broken as per a previous fix.
* Fix for: CA1034: Nested types should not be visible:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1034?view=vs-2019
* Suppressing CA1707 for native/com types.
CA1707:Identifiers should not contain underscores
* Fix for Error CA1307 The behavior of 'string.Replace(string, string?)' could vary based on the current user's locale settings.
* Fixes for Error CA1825 Avoid unnecessary zero-length array allocations. Use Array.Empty<string>() instead.
* Fix for: Error CA1823 Unused field 'IndexLock'.
* Fixes for CA1822: Mark members as static:
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1822?view=vs-2019
* Fix for Error CA1819 Properties should not return arrays
* Fix for Error CA1806 ContextMenus calls Trim but does not use the new string instance that the method returns. Pass the instance as an argument to another method, assign the instance to a variable, or remove the call if it is unnecessary.
* Fix for Error CA1801 Parameter settings of method UpdateSettings is never used. Remove the parameter or use it in the method body.
* Fix for Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'.
* Includes FxCop for static analysis
* Fix for Error CA1717 Only FlagsAttribute enums should have plural names
* Suppress Stgm flags: Error CA1714 Flags enums should have plural names Microsoft.Plugin.Program
* Rename Win32 to Win32Program
Fix for: Error CA1724 The type name Win32 conflicts in whole or in part with the namespace name 'Microsoft.Win32' defined in the .NET Framework. Rename the type to eliminate the conflict.
* Fixes for Error CA1507 Use nameof in place of string literal
* Using ordinal instead of invariant culture when not symbolic comparison
* CA1308: Normalize strings to uppercase
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1308?view=vs-2019
* CA1304: Specify CultureInfo
CA1305: Specify IFormatProvider
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305?view=vs-2019
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1304?view=vs-2019
* CA1062: Validate arguments of public methods
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1062?view=vs-2019
* CA1056: URI properties should not be strings
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1056?view=vs-2019
Fix: Making LogoURi private, as it is only used internally and operated on as a string
* Warning CA1052 Type 'AppxPackageHelper' is a static holder type but is neither static nor NotInheritable
* CA1060: Move P/Invokes to NativeMethods class
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1060?view=vs-2019
* Programs Plugin - Treat warnings as errors true
* CA1031:Do not catch general exception types
Missed release only compile issue. Making debug and release behave the same.
* Renaming 'Create' to 'CreateWin32Program' based on PR feedback.
2020-08-11 09:08:44 -07:00