From 3d2e902ed662002a0ce01e3fde79f59fe02dfd87 Mon Sep 17 00:00:00 2001 From: Nariman Abdullin Date: Tue, 31 May 2022 17:07:23 +0300 Subject: [PATCH] Typos in DEBUG_PRINT ### What's done: - fixed description in available-rules.md - fixed typo in Warnings.kt --- .../main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt | 2 +- info/available-rules.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt index de2e8e7bca..26007098c8 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt @@ -136,7 +136,7 @@ enum class Warnings( FILE_NAME_MATCH_CLASS(true, "3.1.2", "file name is incorrect - it should match with the class described in it if there is the only one class declared"), COLLAPSE_IF_STATEMENTS(true, "3.16.1", "avoid using redundant nested if-statements, which could be collapsed into a single one"), CONVENTIONAL_RANGE(true, "3.17.1", "use conventional rule for range case"), - DEBUG_PRINT(false, "3.18.1", "use a dedicate logging library"), + DEBUG_PRINT(false, "3.18.1", "use a dedicated logging library"), // ======== chapter 4 ======== NULLABLE_PROPERTY_TYPE(true, "4.3.1", "try to avoid use of nullable types"), diff --git a/info/available-rules.md b/info/available-rules.md index d630871f1a..4c1d490239 100644 --- a/info/available-rules.md +++ b/info/available-rules.md @@ -90,7 +90,7 @@ | 3 | 3.16.1 | COLLAPSE_IF_STATEMENTS | Check: warns if there are redundant nested if-statements, which could be collapsed into a single one by concatenating their conditions | yes | no | - | | 3 | 3.16.2 | COMPLEX_BOOLEAN_EXPRESSION | Check: warns if boolean expression is complex and can be simplified.
Fix: replaces boolean expression with the simpler one | yes | no | + | | 3 | 3.17.1 | CONVENTIONAL_RANGE | Check: warns if possible to replace range with until or replace `rangeTo` function with range.
Fix: replace range with until or replace `rangeTo` function with range | yes | no | - | -| 3 | 3.18.1 | DEBUG_PRINT | Check: warns if there is a call of print()\println() or console.log(). Assumption that it's a debug | no | | - | +| 3 | 3.18.1 | DEBUG_PRINT | Check: warns if there is a printing to console. Assumption that it's a debug logging | no | no | - | | 4 | 4.2.1 | SMART_CAST_NEEDED | Check: warns if casting can be omitted
Fix: Deletes casting | yes | no | - | | | 4 | 4.3.1 | NULLABLE_PROPERTY_TYPE | Check: warns if immutable property is initialized with null or if immutable property can have non-nullable type instead of nullable
Fix: suggests initial value instead of null or changes immutable property type | yes | no | - | | 4 | 4.2.2 | TYPE_ALIAS | Check: if type reference of property is longer than expected | yes | typeReferenceLength | -|