[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 116586: CMake indenter
From: "Alexander Neundorf" <neundorf () kde ! org>
Date: 2014-03-04 21:02:47
Message-ID: 20140304210247.28067.62018 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116586/#review51958
-----------------------------------------------------------
Hmm. Just my 2 cent:
Doesn't the cmake syntax highlighting file already also contain such a hardcoded list \
of option names ? Having such a hardcoded list is not too nice, having it twice even \
less so.
Personally I align arguments of function calls to the opening parenthesis, also the \
closing parenthesis. But that's probably just a matter of taste.
- Alexander Neundorf
On March 4, 2014, 5:48 a.m., Alex Turbov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116586/
> -----------------------------------------------------------
>
> (Updated March 4, 2014, 5:48 a.m.)
>
>
> Review request for Kate.
>
>
> Repository: kate
>
>
> Description
> -------
>
> Quite simple, but smart indenter for CMake. It is capable to align (reformat) the \
> document as well. The main purpose of this indenter was to help user to format \
> complex CMake calls like this:
> install(
> DIRECTORY ${name}
> DESTINATION ${DATA_INSTALL_DIR}/kate/pate
> FILES_MATCHING
> PATTERN "*.py"
> PATTERN "*.ui"
> PATTERN "*_ui.rc"
> PATTERN "__pycache__*" EXCLUDE
> )
>
> using just ENTER key.
>
> Also it is aware of CMake "flow control" calls and provide indent/unindent after \
> that well known calls.
>
> Diffs
> -----
>
> tests/data/indent/cmake/enter2/input.js PRE-CREATION
> tests/data/indent/cmake/enter2/expected PRE-CREATION
> tests/data/indent/cmake/enter1/origin PRE-CREATION
> tests/data/indent/cmake/enter1/input.js PRE-CREATION
> tests/data/indent/cmake/enter1/expected PRE-CREATION
> tests/data/indent/cmake/.kateconfig PRE-CREATION
> part/script/data/indentation/cmake.js PRE-CREATION
> tests/data/indent/cmake/enter2/origin PRE-CREATION
> tests/data/indent/cmake/enter3/expected PRE-CREATION
> tests/data/indent/cmake/enter3/input.js PRE-CREATION
> tests/data/indent/cmake/enter3/origin PRE-CREATION
> tests/data/indent/cmake/paren1/expected PRE-CREATION
> tests/data/indent/cmake/paren1/input.js PRE-CREATION
> tests/data/indent/cmake/paren1/origin PRE-CREATION
> tests/indenttest.h 584d744bfd511e9a8937477bada6dd522b6c8ba1
> tests/indenttest.cpp 1ef4822469991c7c2ee910580489fe4f677db2d4
>
> Diff: https://git.reviewboard.kde.org/r/116586/diff/
>
>
> Testing
> -------
>
> The patch contain basic unit tests.
>
>
> Thanks,
>
> Alex Turbov
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/116586/">https://git.reviewboard.kde.org/r/116586/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hmm. Just my 2 cent: \
Doesn't the cmake syntax highlighting file already also contain such a hardcoded \
list of option names ? Having such a hardcoded list is not too nice, having it twice \
even less so.
Personally I align arguments of function calls to the opening parenthesis, also the \
closing parenthesis. But that's probably just a matter of taste. </pre>
<br />
<p>- Alexander Neundorf</p>
<br />
<p>On March 4th, 2014, 5:48 a.m. UTC, Alex Turbov wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Alex Turbov.</div>
<p style="color: grey;"><i>Updated March 4, 2014, 5:48 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Quite simple, but smart indenter for CMake. It is capable to align \
(reformat) the document as well. The main purpose of this indenter was to help user \
to format complex CMake calls like this:
install(
DIRECTORY ${name}
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING
PATTERN "*.py"
PATTERN "*.ui"
PATTERN "*_ui.rc"
PATTERN "__pycache__*" EXCLUDE
)
using just ENTER key.
Also it is aware of CMake "flow control" calls and provide indent/unindent \
after that well known calls.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The patch contain basic unit tests.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>tests/data/indent/cmake/enter2/input.js <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter2/expected <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter1/origin <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter1/input.js <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter1/expected <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/.kateconfig <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>part/script/data/indentation/cmake.js <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter2/origin <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter3/expected <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter3/input.js <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/enter3/origin <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/paren1/expected <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/paren1/input.js <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/data/indent/cmake/paren1/origin <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>tests/indenttest.h <span style="color: \
grey">(584d744bfd511e9a8937477bada6dd522b6c8ba1)</span></li>
<li>tests/indenttest.cpp <span style="color: \
grey">(1ef4822469991c7c2ee910580489fe4f677db2d4)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116586/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic