Plugin to extend R# functionality by set of custom actions.
Plugin could be configured either using the dedicated settings page (search for "ReSharper Helpers" section) or by .editorconfig
file.
💡 It's recommended to use .editorconfig
file to store project specific settings.
The following settings are available.
💡 You can put .editorconfig
file to a project's folder to configure each project separately.
Name: resharperhelpers_tests_project_name
Format: String name of existing Tests project
Example:
[*.cs]
resharperhelpers_tests_project_name = All.Unit
By default plugin tries to apply heuristics and discover test project name automatically. If however you have an unusual setup, you can use this setting to configure a custom project name.
Notice, this setting affects both existing tests discovery and new tests creation.
Name: resharperhelpers_tests_project_sub_namespace
Format: Dot-separated list of namespace chunks to prepend to test class name
Example:
[*.cs]
resharperhelpers_tests_project_sub_namespace = Integration.Core
By default it's assumed that both code and test will have the same relative namespace (i.e. excluding default project namespace). This setting allows to customize it by adding extra namespace chunks to test relative namespace when calculating final value. Effectively it allows to nest tests within extra folders.
That could be useful if you have a shared unit tests project and want your projects with code to each have its own root folder.
Notice, this setting affects both existing tests discovery and new tests creation.
Name: resharperhelpers_new_test_class_name_suffix
Format: String value
Default: Tests
Example:
[*.cs]
resharperhelpers_new_test_class_name_suffix = Test
Suffix to append to class name when creating a new test (e.g. MyProvider
-> MyProviderTests
).
Name: resharperhelpers_existing_test_class_name_suffixes
Format: Comma separated list of suffixes
Default: Test,Fixture
Example:
[*.cs]
resharperhelpers_existing_test_class_name_suffixes = TestFixture,Validation
A list of test suffixes used to find an existing test. Each suffix will be probed one by one. Setting is useful if you have existing code base and some tests have different suffixes.
New test class name suffix is added implicitly.
Quick action to go to corresponding test file or create it. Usually, test project name is detected automatically, but could be configured (see above).
Extend solution, project and directory context menu with additional action to perform cleanup on modified files only. Action uses git to get list of the modified files. All the dirty files (indexed and non-indexed) are included. If you select project or directory (or multiple ones simultaneously), list of files to cleanup is limited to the appropriate scope.
When bulb menu is opened (e.g. after you press Alt+Enter
), you can use Ctrl
+ Up/Down
to navigate to next section. Useful if quick actions menu becomes really large.
If section is very large, it jumps to the middle of the section before jumping to the next/previous one.
Quick actions to add/remove [Frozen]
or [Greedy]
attributes for AutoFixture xunit integration. Allows to specify match criteria for the [Frozen(Matching.XXX)]
attribute.
Extend "Copy Code Reference" menu with an extra item which contains fully qualified class/struct/interface name (including assembly name). Useful when there is a need to copy type name in a config.
To access the menu put the cursor on class/struct/interface name identifier, hit "Alt+Enter", type "fqn" and hit "Enter". The list will contain an extra entry.
Quick actions to add/remove Pure
annotation attribute.
Quick actions to chop method arguments or make them one line (remove all line breaks). Useful to format method signatures with large number of parameters (e.g. in tests).
Quick action for method argument to insert assertion statement. Allows to assert all nullable argument using Assert all
action.
If annotation attributes are available and relevant for argument, they are arranged.
Custom R# Build Configuration that builds solution and runs it. The difference comparing to the "VS Startup" (default) configuration is that the default one builds the startup project (with all dependencies) rather than a solution. If you have projects which you want to be always built, they might be skipped if your startup project doesn't depend on them.
This configuration might be useful when you develop a custom plugin that depends on the startup project. You might want the plugin to be always built and copied to the startup project output directory. In this scenario you can:
- Mark the plugin project as "Build always".
- Create and activate the "Launch Solution" build configuration in the
Build & Run
window.
Pre-release builds (develop branch) are published to custom nuget feed. If you want to use pre-release builds, add the following extension source to ReSharper: https://www.myget.org/F/alexpovar-resharperhelpers-prerelease/api/v2
.