You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "junichi11 (via GitHub)" <gi...@apache.org> on 2023/12/24 10:24:26 UTC

[PR] Fix the formatting for the method call arguments alignment option #6714 [netbeans]

junichi11 opened a new pull request, #6877:
URL: https://github.com/apache/netbeans/pull/6877

   - https://github.com/apache/netbeans/issues/6714
   - Consider the TAB size when a column size is got
   
   Example:
   ```php
   array_merge(
   	$x,
   	$y,
   );
   ```
   
   Before:
   
   ```php
   array_merge(
   	$x,
    $y,
   );
   ```
   
   After:
   
   ```php
   array_merge(
           $x,
           $y,
   );
   ```
   
   - Keep the last anchor to a stack when a method calls are nested
   
   Example:
   
   ```php
   nestedCall(
   	something(
   				$arg1,
   			$arg2,
   		C::something(
   					$x,
   					$y,
   				$z,
   		)
   	),
   			$y,
   		$z,
   );
   ```
   
   Before:
   
   ```php
   nestedCall(
   	something(
   		$arg1,
     $arg2,
     C::something(
   			$x,
      $y,
      $z,
   		)
   	),
      $y,
      $z,
   );
   ```
   
   After:
   
   ```php
   nestedCall(
   	something(
   		$arg1,
   		$arg2,
   		C::something(
   			$x,
   			$y,
   			$z,
   		)
   	),
   	$y,
   	$z,
   );
   ```
   
   - Add unit tests
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Fix the formatting for the method call arguments alignment option #6714 [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #6877:
URL: https://github.com/apache/netbeans/pull/6877#discussion_r1435800789


##########
php/php.editor/test/unit/data/testfiles/formatting/alignment/gh6714_01.php.testGH6714WithTab_01a.formatted:
##########
@@ -0,0 +1,84 @@
+<?php
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace NS\GH6714;
+
+use Vendor\Package\TestClass1;
+use function Vendor\Package\{
+	function1,
+	function2,
+};
+use function Vendor\Package\{
+	function3,
+	function4,
+};
+use const Vendor\Package\CONSTANT1;
+
+class GH6714 implements Interface1,
+						Interface2,
+						Interface3 {

Review Comment:
   Tab size is 8 here(GitHub), but it is 4(`options.put(FmtOptions.TAB_SIZE, 4);`) in the unit tests. So this is correct.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Fix the formatting for the method call arguments alignment option #6714 [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 merged PR #6877:
URL: https://github.com/apache/netbeans/pull/6877


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Fix the formatting for the method call arguments alignment option #6714 [netbeans]

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #6877:
URL: https://github.com/apache/netbeans/pull/6877#discussion_r1435841876


##########
php/php.editor/test/unit/data/testfiles/formatting/alignment/gh6714_01.php.testGH6714WithTab_01a.formatted:
##########
@@ -0,0 +1,84 @@
+<?php
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace NS\GH6714;
+
+use Vendor\Package\TestClass1;
+use function Vendor\Package\{
+	function1,
+	function2,
+};
+use function Vendor\Package\{
+	function3,
+	function4,
+};
+use const Vendor\Package\CONSTANT1;
+
+class GH6714 implements Interface1,
+						Interface2,
+						Interface3 {

Review Comment:
   I see, thanks.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Fix the formatting for the method call arguments alignment option #6714 [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #6877:
URL: https://github.com/apache/netbeans/pull/6877#issuecomment-1868612791

   Thank you for your quick review, Tomas! Merging.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists