rspec/rules/S2615/rule.adoc
Fred Tingaud 35036fffff
Add check that each section is used only once
There was already a check for section duplication, but only in "How to
fix it". This changes the test to cover all sections.
And fixing the rules that this new validation fails on.

Also making test_modify_rule.py run on Windows.

---------

Co-authored-by: Christophe Zürn <36889251+christophe-zurn-sonarsource@users.noreply.github.com>
2023-06-13 18:03:28 +02:00

15 lines
432 B
Plaintext

== Why is this an issue?
Using an unsanitized, externally-provided format string could lead to errors at runtime and open the door to attackers. This rule raises an issue when an externally-provided format string is used.
=== Noncompliant code example
[source,text]
----
public void formattedLog(String format, String message) {
String logLine = String.format(format, message); // Noncompliant
LOGGER.info(logLine);
}
----