S

Search string constants

JetBrains

33feaa43-e3ac-4d1d-8d05-d65042604ee5 · v—

The purpose of this plugin is to search for string literals in your code and replace them with existing constants from your code, SDK or libraries. It does so via a new inspection. For example: You create a REST service and filter http requests based on Content-type header. It's always better to use a constant for things like header names and values. And most probably you already have it somewhere in your http libraries. But which class, how to find them? Right, using th

Inspection
Open in store ↗ id: 11016
Downloads
2K
2 229
Rating
4.1 ★
2 ratings
Category
JetBrains Marketplace
Collected
2026-11-04
weekly snapshot

Rating distribution

4.1 ★ 2 ratings
5★ 50.0%
4★ 50.0%

Reviews 2

★★★★★ Ben Peter 2020-10-13

The inspection's name is "Replace all hardcoded strings", btw.

★★★★★ Sergey Ponomarev 2019-07-17

It works, but with one minor bug when false positive on the constant itself. I tried to contact the plugin's author and ask him to publish sources on GitHub so we can report an issue or contribute, but he didn't answered. I decomplied sources and since the license is MIT so I'll republish the inspection in the [Mike's IDEA...

Similar in “Inspection”