Clint Rutkas
5c1713f274
wrapping up everything minus var renaming ( #5952 )
2020-08-14 09:22:24 -07:00
Clint Rutkas
913615f1c2
more braces and whitespace style errors ( #5951 )
2020-08-14 09:22:12 -07:00
Clint Rutkas
23a9fa40e7
Additional formatting tweaks ( #5909 )
2020-08-13 15:32: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
e4ea8d2abd
Correcting floating point error ( #5949 )
2020-08-13 14:02:38 -07:00
Clint Rutkas
5079ee67c3
[stylecop] program plugin unit tests part2 ( #5925 )
...
* Another batch
* Commenting out stylecop
2020-08-13 11:10:55 -07:00
Divyansh Srivastava
f499ff81f2
Prevent copying of files from folder to shell plugin ( #5893 )
2020-08-12 15:16:29 -07:00
Alekhya
e80c7b6b45
Fix for PowerLauncher crash - Type Load Exception ( #5906 )
...
* Added the version number for all launcher projects so that they are in sync with the powerToys version number
* Removed internals visible to Wox.dll as we no longer have that library
2020-08-12 14:18:01 -07:00
Arjun Balgovind
f3babcb46e
Fixed exceptions in indexer and delayed execution logic ( #5912 )
2020-08-12 12:44:55 -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
Clint Rutkas
8888739867
fixing all warnings and info for infra ( #5891 )
2020-08-12 10:44:58 -07:00
ryanbodrug-microsoft
db6e9b6962
Adding FxCop to Program Plugin Unit Tests ( #5884 )
...
* Adding FxCop to Microsoft.Plugin.Program.UnitTests
* CA1707: Identifiers should not contain underscores
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1707?view=vs-2019
* CA1307: Specify StringComparison
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1307?view=vs-2019
* CA1812: Avoid uninstantiated internal classes
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1812?view=vs-2019
* More CA1707: Identifiers should not contain underscores fixes now that class is public
* More fixes for https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1812?view=vs-2019
List Repository and Win32ProgramRepository
* More CA1707: Identifiers should not contain underscores fixes now that class is public
ListRepository and Win32ProgramRepository tests
* Adding `ConfigureAwait(false)` and removing Assert.DoesNotThrowAsync as thowing an exception will fail the test anyway, and the DoesNotThrowAsync method can't be awaited.
Fix for CA2007: Do not directly await a Task (Consider calling ConfigureAwait on the task).
CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
* Setting treat warning as errors to true for release and debug.
2020-08-12 10:03:34 -07:00
Clint Rutkas
a0832d3fb6
enabling stylecop ( #5885 )
2020-08-11 16:35:58 -07:00
Divyansh Srivastava
1c77887629
Reduce folder plugin results ( #5631 )
...
* Reduce folder plugin results
* Added warning message
* Added UI content for warning message in folder plugin
* nit fixes for folder plugin changes
* Localised warning message
* fix Merge conflicts
* nit fixes and move warning to end of results
* Add IDisposable interface to folder plugin
* Add images to MSI
2020-08-11 15:06:40 -07:00
Arjun Balgovind
dcd0ca8daa
[PT Run] Split indexer plugin's queries into a fast and slow query ( #5748 )
...
* Added regex code
* Added regex based method to remove all LIKE queries
* Made regex readonly
* Added plugin interface and code to execute slower plugins after the fast plugins
* Added scoring for indexer and added statement to remove old indexer results
* Refactored from master and added thread sleep for debugging
* Removed lock from indexer plugin and added checks to avoid exceptions
* Remove debug statement
* Removed selected index update and fixed tests not building
* Added tests
* Removed scoring
* Removed lock
* Resolve merge conflicts
* Moved dispatcher code to function and add parallel foreach loop
* Removed DelayedExec metadata and modified QueryForPlugin to run only delayed exec plugins when bool param is true
* Removed metadata from plugin.json
2020-08-11 14:52:03 -07:00
Clint Rutkas
304981fcf2
[stylecop] Wox.Core - last amount needed to fully integrate ( #5877 )
...
* Looks like it was done
* StyleCop enabled for WoxCore
2020-08-11 14:12:08 -07:00
Clint Rutkas
f1bb533321
[StyleCop] Wox.Plugin - last amount needed to fully integrate ( #5853 )
...
* StyleCop for Plugin
* getting release mode working
2020-08-11 13:41:41 -07:00
Clint Rutkas
2c49df4be3
more fixes for getting styleCop up, this will need one more push to get another 15 that will require renaming of vars ( #5875 )
2020-08-11 13:40:26 -07:00
Roy
90502f7553
Add Microsoft.Plugin.Uri.UnitTests to CI + Fix Tests ( #5878 )
...
Co-authored-by: Roy <royvou@hotmailcom>
2020-08-11 11:49:44 -07:00
Divyansh Srivastava
2d2cb22806
Stable sorting of ResultCollection ( #5850 )
...
* Stable sorting of ResultCollection
* nit fixes for resultsViewModel and ResultCollection
2020-08-11 10:24:56 -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
Divyansh Srivastava
d21201e996
Reduce program plugin results ( #5743 )
...
* Added minimum score threshold
* nit fix for program plugin
2020-08-10 16:25:34 -07:00
Roy
ba2ef23414
[PowerToys Run] Add Support for Uris ( #5160 )
...
* url handler plugin
* updates
* Add seperate interface classes
rename to uri module
* Update path
* Update implementation to remove slow DNS lookup ( and let browser handle it)
* tabs to spaces
* - Update icon/assets
- Finalize Project
* Update wix project
* Implement UpdateBrowserIconPath
* Implemented Microsoft.CodeAnalysis.FxCopAnalyzers
* Add Language component to installer
* Update logic to determine icon
* Update Translation File to "Open in browser"
* Added test for typing http://test.com and which result to expect on each keystoke
* Implement StyleCop
* Added ipv6 tests
* Fix Solution LineBreaks
* Added Microsoft.Plugin.Uri as build Dependency
* Use ArgumentNullException instead of InvalidOperationException
* Fix wrong Directory in wix installer
Co-authored-by: Roy <royvou@hotmailcom>
2020-08-10 15:53:43 -07:00
Divyansh Srivastava
3781d1e06b
Consolidate folder and shell plugin ( #5843 )
...
* Added folder plugin functionality to shell plugin
* Added QueryTextDisplay for shell plugin
* Remove QueryTextDisplay change
* Fix merge conflict issues
2020-08-10 15:51:02 -07:00
Clint Rutkas
082a78bd92
Getting remaining Tests on stylecop ( #5846 )
2020-08-10 15:49:36 -07:00
Clint Rutkas
7bfd0823db
Enabling StyleCop for folder plugin ( #5844 )
2020-08-10 13:28:22 -07:00
Divyansh Srivastava
b2006f2466
Remove all plugin results on query change ( #5796 )
2020-08-07 19:27:52 -07:00
Clint Rutkas
ada42f6e94
in theory this fixes all SA1649 issues now with any project with stylecop enabled ( #5786 )
2020-08-07 11:56:28 -07:00
Clint Rutkas
34c3b50b48
Incremental fix for StyleCop on Infra ( #5729 )
...
* Fixes file names and classes don't match. All but PluginsSettings
* making it pluginsettings
* fixing due to conflict
2020-08-07 10:45:50 -07:00
Clint Rutkas
26bf05dd7e
whitespace changes ( #5750 )
2020-08-06 20:38:49 -07:00
Clint Rutkas
b815718c26
whitespace only ( #5747 )
2020-08-06 16:52:25 -07:00
Clint Rutkas
d7994ca67d
style cop wox.core whitespace changes ( #5744 )
...
* whitespace changes
* undoing csproj tweak to keep stylecop off
2020-08-06 16:51:47 -07:00
Arjun Balgovind
b95a1fb604
Unlinked the MaxResults value from settings and set to fixed value of 30 ( #5742 )
2020-08-06 16:44:13 -07:00
Clint Rutkas
d6e46d73b5
whitespace stylecop fixes for Wox.Infra ( #5689 )
...
* Limited to whitespace
* removing stylecop again
2020-08-06 11:28:13 -07:00
Clint Rutkas
ed36447bdf
Fixing stylecop violations ( #5629 )
2020-08-06 10:10:44 -07:00
Clint Rutkas
0f90af3c7d
URL audit ( #5685 )
2020-08-06 10:09:50 -07:00
Clint Rutkas
ff69f6ed7f
fixing most whitespace issues, reordering namespaces and adding in headers ( #5677 )
2020-08-05 14:06:55 -07:00
Clint Rutkas
92a2b83bc8
smaller stylecop fixes in Wox.Core and Wox.Infra ( #5671 )
...
* Headers
unneeded usings
files need blank line at bottom
Fixed double returns
Returns after braces
* commenting out stylecop
2020-08-05 14:06:42 -07:00
Alekhya
30b65028fe
Fix Code Related PT Run Accessibility issues ( #5610 )
...
* set the name automation properties for the result elements
* Added name properties to search box
* removed the name for the grid
* localized the automation property names of the launcher control
* Localized the automation name property for the result list
* Uncommented out the Hide() function which was commented out to run Accessibility Insights
* modified resources from static to dynamic
* reverted access modifier to internal as we are no longer using this
* updated csproj file
2020-08-05 13:43:47 -07:00
Alekhya
814f6213fa
Added null check before using unregister hotkey function ( #5627 )
2020-08-05 08:06:03 -07:00
Clint Rutkas
b87d14cd61
Proper fix for MSB3052. ( #5618 )
...
* fixing MSB3052
* adding back in to unblock build
* More agressive refactor. Moved the define constant to wixproj and actual version into src file version prop
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-08-05 00:04:18 -07:00
Arjun Balgovind
5c10c78595
Fixed exceptions in dispose not allowing PT Run to terminate ( #5615 )
2020-08-04 21:06:07 -07:00
Clint Rutkas
a793cf4ac2
onboarding stylecop ( #5622 )
2020-08-04 16:39:25 -07:00
Clint Rutkas
296d103f68
Getting Shell on stylecop ( #5620 )
2020-08-04 16:27:35 -07:00
Hector Minaya
d11b5b3e02
Power Launcher | #5062 Moved Start Typing... to resource file ( #5408 )
2020-08-04 09:53:58 -07:00
Ivan Stošić
8f8787b2e0
Fixed Launcher not exiting when PT is terminated ( #5588 )
...
* Fixed Launcher not exiting when PT is terminated
* Added a null check to _hotkeyManager as well
2020-08-04 14:33:07 +02:00
Clint Rutkas
1456be9feb
wrapping agressively the timer. ( #5560 )
...
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-08-03 16:46:15 -07:00
Clint Rutkas
c946f10d0c
fixing all warnings and i think i got one larger one that was before stylecop was enabled, OnOpenWindowsUpdate ( #5382 )
...
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 16:42:24 -07:00
Clint Rutkas
e03ef0b739
Remove InputSimulator nuget package ( #5388 )
...
* getting app to not use it, now installer
* removed windowinput.dll from inputsimulator nuget package
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-31 15:16:49 -07:00