Regardless of you are new to IntelliJ inspections or you are a master wizard looking for hidden gems, this might be a good place to come to learn more about creating Structural Search and Replace templates.
On this page you can find the list of articles and tutorials that can help you learn about the different aspects of writing templates.
The list is continuously extended but if you are interested in something that you cannot find here, please create an issue in the intellij-inspections GitHub project.
Basics
Official Structural search and replace documentation
Filter types
- Text filter
- Type filter
- Reference filter
- Count filter
- Script filter
- Contained in constraint “filter”
Filter traits
Project setup
How to add project specific inspections to your Git project
Tutorials
Frameworks, libraries
- General test automation framework
- AssertJ / Cucumber / Guava / Native Java / Lombok / Mockito / Selenium
- IntelliJ release notes
Template types
Incomplete templates
Although these templates work, they signal some false positives that may be confusing. Thus they need a little bit more investigation.
Topics
Search and replace template traits
Advanced Script filters
- Script filtering
- Using imports in script filters
- Iterate through methods of a superclass
- Method call chains
Java
- Annotations
- Methods
- Statements with or without semicolon