
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>
15 lines
432 B
Plaintext
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);
|
|
}
|
|
----
|