aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrnveach <rveach02@gmail.com>2017-08-03 15:03:58 -0400
committerRoman Ivanov <romani@users.noreply.github.com>2017-08-04 22:04:34 +0300
commitfd7fb45d409a2de0dead15f907e69b330dbaa5dc (patch)
tree42bfaa349e43adcfd150986054911235406c1606
parent9db63c371670e15a9c1c81775420f0256ea7ec23 (diff)
downloadcheckstyle-fd7fb45d409a2de0dead15f907e69b330dbaa5dc.tar.gz
Issue #3671: removed maxLineLength in LeftCurlyCheck
-rw-r--r--config/checkstyle_checks.xml4
-rw-r--r--src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java11
-rw-r--r--src/main/resources/google_checks.xml4
-rw-r--r--src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java2
-rw-r--r--src/xdocs/config_blocks.xml13
5 files changed, 3 insertions, 31 deletions
diff --git a/config/checkstyle_checks.xml b/config/checkstyle_checks.xml
index be1a6f8e6..59c91be58 100644
--- a/config/checkstyle_checks.xml
+++ b/config/checkstyle_checks.xml
@@ -166,9 +166,7 @@
<property name="option" value="text"/>
</module>
<module name="EmptyCatchBlock"/>
- <module name="LeftCurly">
- <property name="maxLineLength" value="100"/>
- </module>
+ <module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="NeedBraces">
<property name="tokens" value="LAMBDA"/>
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java
index a4b937078..2b660bb49 100644
--- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java
@@ -120,17 +120,6 @@ public class LeftCurlyCheck
}
/**
- * Sets the maximum line length used in calculating the placement of the
- * left curly brace.
- * @param maxLineLength the max allowed line length
- * @deprecated since 6.10 release, option is not required for the Check.
- */
- @Deprecated
- public void setMaxLineLength(int maxLineLength) {
- // do nothing, option is deprecated
- }
-
- /**
* Sets whether check should ignore enums when left curly brace policy is EOL.
* @param ignoreEnums check's option for ignoring enums.
*/
diff --git a/src/main/resources/google_checks.xml b/src/main/resources/google_checks.xml
index f5efa5515..a983c44e8 100644
--- a/src/main/resources/google_checks.xml
+++ b/src/main/resources/google_checks.xml
@@ -51,9 +51,7 @@
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
- <module name="LeftCurly">
- <property name="maxLineLength" value="100"/>
- </module>
+ <module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java
index 634d8c1c3..0c21a7731 100644
--- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java
@@ -239,7 +239,6 @@ public class LeftCurlyCheckTest extends AbstractModuleTestSupport {
@Test
public void testLineBreakAfter() throws Exception {
checkConfig.addAttribute("option", LeftCurlyOption.EOL.toString());
- checkConfig.addAttribute("maxLineLength", "100");
final String[] expected = {
"9:1: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 1),
"12:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5),
@@ -332,7 +331,6 @@ public class LeftCurlyCheckTest extends AbstractModuleTestSupport {
@Test
public void testFirstLine() throws Exception {
checkConfig.addAttribute("option", LeftCurlyOption.EOL.toString());
- checkConfig.addAttribute("maxLineLength", "100");
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputLeftCurlyFirstLine.java"), expected);
}
diff --git a/src/xdocs/config_blocks.xml b/src/xdocs/config_blocks.xml
index 01bc42ea3..1f89b3743 100644
--- a/src/xdocs/config_blocks.xml
+++ b/src/xdocs/config_blocks.xml
@@ -455,9 +455,7 @@ try {
<p>
Checks for the placement of left curly braces
(<code>'{'</code>) for code blocks. The policy to verify is
- specified using the property <code>option</code>. Policies
- <code>eol</code> and <code> nlow</code> take into account
- the property <code>maxLineLength</code>.
+ specified using the property <code>option</code>.
</p>
</subsection>
@@ -485,15 +483,6 @@ try {
<td>6.9</td>
</tr>
<tr>
- <td>maxLineLength</td>
- <td>maximum number of characters in a line. ATTENTION:
- The option has been marked as <b>deprecated</b>
- since checkstyle 6.10 release.</td>
- <td><a href="property_types.html#integer">Integer</a></td>
- <td><code>80</code></td>
- <td>3.0</td>
- </tr>
- <tr>
<td>tokens</td>
<td>tokens to check</td>