On the Code Inspection | Generated Code page of ReSharper options ( Alt+R, O ), use the Add File and the Add Folder buttons to specify files or folders that contain generated code. Generated_code = true Specify files and regions with generated code editorconfig in your solution, you can also mark generated code using the generated_code property. Some file masks and regions, which are typically used for generated code, for example *.designer.cs are included in this list by default, but you can change the default settings if necessary. For these items, ReSharper runs only those code inspections that check code for compiler errors and warnings. You can also configure the list of files, folders, file masks, and regions that contain generated code. Partly disable code inspection for generated code To add projects to the ignore list, either use project file names - for example ProjectOne.csproj, or file masks - for example Project*.csproj to match ProjectOne.csproj, ProjectTwo.csproj, and so on. So if after adding some projects to the ignore list, you have errors like 'Cannot resolve symbol', you need to build the ignored projects and ReSharper will be able to resolve those symbols from the compiled artifacts. This means that after you build the ignored projects, ReSharper will correctly resolve usages of symbols from those projects and you will be able to enjoy navigate and search in those projects. This list is mainly intended to improve performance by not indexing and not analyzing projects that contain third-party code or frozen code, which is not going to be changed.Īlthough the source files in the ignored projects are not parsed, ReSharper will still process the compiled code from the output of those projects (which is very cheap performance-wise). The ignored projects will not be indexed by ReSharper, meaning that no ReSharper features - for example, code analysis, refactorings, code generation - will be available in those projects. On the Code Inspection | Ignored Code page of ReSharper options ( Alt+R, O ), you can also use the Projects to ignore list to specify projects that should be completely ignored by ReSharper. You can recognize files where code inspection is disabled by the pause icon on the status indicator. Right-click the status indicator and choose Pause/Resume analysis. Exclude/include current file from/to code inspection You can also quickly exclude the current file from code inspection so that ReSharper adds this file to the list of excluded files without opening the options. In the right part of this section, you can specify masks (for example *.vb) that will exclude all matching files in the solution from code inspection. In the left part of the Elements to skip section, you can specify files or folders to be ignored by the code inspection. Select ReSharper | Options from the main menu or press Alt+R O, then choose Code Inspection | Ignored Code on the left. Exclude specific files and folders from code inspection The excluded items are ignored by both design-time code inspection and code inspection in specific scope, but they are still indexed by ReSharper, so that you can navigate to or refactor symbols excluded from code inspection. ReSharper allows you to configure the list of files, file masks, and folders that should be excluded from code inspection. For more information, refer to manage and share resharper settings.Įxclude files and folders from code inspection Use other options on that settings page to tune the design-time inspection to your liking.Ĭlick Save in the Options dialog to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To list. If necessary, you can select the Enable solution-wide analysis checkbox to enable the Solution-wide analysis. Use the Enable code analysis checkbox to toggle the design-time code inspection. Select ReSharper | Options from the main menu or press Alt+R O, then choose Code Inspection | Settings on the left. Regardless of whether or not the design-time code inspection is enabled, you can always run code inspection in specific scope. Configure design-time code inspectionīy default, ReSharper enables design-time code inspection in all files corresponding to the supported languages. You can also use code annotations to customize the way ReSharper inspects your code.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |