Presentation is loading. Please wait.

Presentation is loading. Please wait.

ReSharper Dainius Kreivys.

Similar presentations


Presentation on theme: "ReSharper Dainius Kreivys."— Presentation transcript:

1 ReSharper Dainius Kreivys

2 Contents 1. What are static code analysis tools?
2. Why static code analysis is needed? 3. When we should use these tools? 4. About Resharper 5. Navigation 6. To-do Explorer 7. Code assistance 8. Code completion 9. Refactorings 10. Prices 11. Summary

3 What are static code analysis tools?
These tools helps to maintain software code automatically. They help to detect errors and problems before compiling the code. These tools instantly tracks the writable code and highlights mistakes

4 Why static code analysis is needed?
Analysis helps find most common made mistakes in code: Unused added libraries Unplaced but needed null checkers Unreachable code detection Unassigned variables It also helps to write code faster with code generation feature.

5 When we should use these tools?
Same coding style Protection from commonly made mistakes Track quality of code Write code faster

6 About ReSharper ReSharper is Visual Studio extension for C#, VB.NET, ASP.NET, C++, JavaScript technologies. It is based on static code analysis. It is well known and most used extension for IDE that provides quick-fixes, highlights to improve code in one way or another.

7 Code Quality Analysis Software code problems are classified in:
Errors Warnings Suggestions Hints Coding style templates can be customizable. Problems that are detected and fixed: Code that will not be compiled or will have negative impact Unreachable code Loops are remodeled in LINQ, keyword var is used in type definition. Reducing nesting Etc…

8 Refactoring Facts about resharper:
All found errors in code can be automatically fixed Usually errors are fixed 1 by 1 not all at once. Sometimes it is possible to contract ~10 lines of code to just 1 line of LINQ statement. In some cases there was found that a project of LoC, had about of problems that where found in under 5minutes using ReSharper.

9 Warnings, suggestions and hints
ReSharper informs you about redundant casts, incorrect format strings, declared but never used local variables, etc.  Suggestions provide insights into code structure, drawing your attention to things that aren't necessarily bad or wrong, but probably useful to know. A hint simply brings your attention to a particular code detail and recommends a way of improvement.

10 Navigation Navigate To. Alt + ~ Go to Implementation. Ctrl + F12
Go to Everything. Ctrl + T Go to Action. Alt + Enter Go to Related Files. Ctrl+Alt+F7 Also you can use wildcards for navigation: *, ?, +

11 To-do Explorer Helps find: todo, note, bug tags.
Possible to add more tags Useful for detecting places that needs to be modified. Tags are marked in blue color so it would have more visibility for developer.

12 Coding Assistance Syntax Highlighting Context Actions
Complete Statement Ctrl + Shift + Enter

13 Coding Assistance Parameter Info Ctrl + Shift + Space
Importing Namespaces Alt + Enter

14 Coding Assistance Automaticaly shows begining of brackets, when mouse is over the end of brackets in code. Current code line marking Automaticaly close brackets Extend / shrink code fast Ctrl+Alt+Right / Left All coding assistance features are customizable and can be turned off if needed.

15 Code Completion Drop down suggestion: Ctrl + Space
Expands standart Visual Studio Intelli Sense drop down list Suggests variable names Suggests data type names and casts Drop down suggestions usually fits many developer needs, so they most often are required just to press Ctrl + Space, Enter, Ctrl + Space…

16 Refactorings ReSharper can refactor: Move, pull, rename code
Convert Abstract Class to Interface and vice-versia Introduce Parameter Make Method Static/Shared and vice-versia Move String to Resource Push / Pull members up and down Rename in whole program, file Convert property to Auto-Property Inline fields, methods

17 Refactorings Whole page code refactoring. Ctrl + E, C automatically refactors whole file by such factors: Fixes names Removes unused code Reformats code by moving classes and methods by given order. Code refactoring is mostly used function to verify that the code meets given coding standard.

18 Prices For companies: For individuals:

19 Summary ReSharper is a fine tool that has very good integration with Visual Studio IDE It is a great investment for companies that develop software in Visual Studio, that raises the coding abilities at least 20% The biggest feature that this tools offers is minimizing the same actions that are done by the developer. The price is very expensive and can frighten off individual developers.

20 Questions?


Download ppt "ReSharper Dainius Kreivys."

Similar presentations


Ads by Google