<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Code style used for Liferay source (for Java)</title>
  <link rel="self" href="https://liferay.dev/hu/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111945245" />
  <subtitle>Code style used for Liferay source (for Java)</subtitle>
  <id>https://liferay.dev/hu/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111945245</id>
  <updated>2026-09-12T15:11:55Z</updated>
  <dc:date>2026-09-12T15:11:55Z</dc:date>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111960132" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111960132</id>
    <updated>2019-01-08T15:08:48Z</updated>
    <published>2019-01-08T15:08:48Z</published>
    <summary type="html">&lt;p&gt;I'm not sure to be honest. My experience has always been that code
  formatting is handled as part of a build time activity (if it
  matters). Personally, I use some conventions in my code that don't
  even follow the &amp;quot;Java&amp;quot; norm -- for example, I like to line
  up my braces in the left hand column. For projects where it was
  necessary to have all the code formatted a certain way, the build
  engineer integrated a step into the build process that would format
  the source. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'm not sure if you have seen it, but I did find this reference in
  the docs:&lt;/p&gt;
&lt;p&gt; &lt;a href="https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-0/source-formatter-plugin"&gt;https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-0/source-formatter-plugin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;.. I know it is a Maven plugin, but you can easily run maven goals
  from your Gradle projects as well. I didn't read it in detail though
  so I am not sure if perhaps it is the same thing you have already tried.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I know that some people also have a setting in their IDE that will
  auto format source when you hit save. You might want to disable all
  that stuff and try the build tools on their own to see if maybe one is
  overriding the other.&lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-08T15:08:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111953688" />
    <author>
      <name>Nagendra Kumar Busam</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111953688</id>
    <updated>2019-01-08T05:16:52Z</updated>
    <published>2019-01-08T05:16:52Z</published>
    <summary type="html">&lt;p&gt;Thank you, that helps. I tried to run the same for my custom module
  project ( Gradle one though) - It was showing what are the issues w/
  code. Does it really format? Do we need to manually fix the
  suggestions once formatter is run?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Is there a way we can make format source code in Eclipse windows
  machine (CTRL + SHIFT + F will auto &lt;b&gt;format&lt;/b&gt; your&lt;b&gt;code)
  &lt;/b&gt;makes equilavent of formatSource of gradle task.&lt;/p&gt;</summary>
    <dc:creator>Nagendra Kumar Busam</dc:creator>
    <dc:date>2019-01-08T05:16:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111952591" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111952591</id>
    <updated>2019-01-07T20:54:41Z</updated>
    <published>2019-01-07T20:54:41Z</published>
    <summary type="html">I'm not sure whcih version of the portal you are using, but looking
through one of my 7.0 projects (with Gradle) I can see that there is a
&amp;quot;formatting&amp;quot; category and that under this category there is a
&amp;quot;formatSource&amp;quot; task. Have you tried using this?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-07T20:54:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111950277" />
    <author>
      <name>Nagendra Kumar Busam</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111950277</id>
    <updated>2019-01-07T17:21:51Z</updated>
    <published>2019-01-07T17:21:51Z</published>
    <summary type="html">&lt;p&gt;Preference &amp;gt; Check Style &amp;gt; Formatter &amp;gt; GoogleStyle ( as in
  above link)&lt;/p&gt;
&lt;p&gt;
  &lt;img
    src="/documents/14/110203810/Screen+Shot+2019-01-07+at+22.48.30.png/320dadc7-c5b6-2681-11d6-db06b2412ca8?t=1546881552044" style="height: 92.0px;width: 200.0px;" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How to use Liferay's checkstyle for custom code, any links would be helpful.&lt;/p&gt;</summary>
    <dc:creator>Nagendra Kumar Busam</dc:creator>
    <dc:date>2019-01-07T17:21:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111949583" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111949583</id>
    <updated>2019-01-07T16:52:46Z</updated>
    <published>2019-01-07T16:52:46Z</published>
    <summary type="html">I suppose the answer is, it depends. Are you using the checkstyle plugin?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-07T16:52:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111946264" />
    <author>
      <name>Nagendra Kumar Busam</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111946264</id>
    <updated>2019-01-07T15:41:58Z</updated>
    <published>2019-01-07T15:41:58Z</published>
    <summary type="html">&lt;p&gt;Kind of, something in the lines of &lt;a href="https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml"&gt;https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;BUT I cannot import checkstyle from the link your provided into
  Eclipse directly, right?&lt;/p&gt;</summary>
    <dc:creator>Nagendra Kumar Busam</dc:creator>
    <dc:date>2019-01-07T15:41:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111945920" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111945920</id>
    <updated>2019-01-07T15:34:08Z</updated>
    <published>2019-01-07T15:34:08Z</published>
    <summary type="html">&lt;p&gt;You mean something like this?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/src/main/resources/checkstyle.xml&lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-01-07T15:34:08Z</dc:date>
  </entry>
  <entry>
    <title>Code style used for Liferay source (for Java)</title>
    <link rel="alternate" href="https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111945244" />
    <author>
      <name>Nagendra Kumar Busam</name>
    </author>
    <id>https://liferay.dev/hu/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111945244</id>
    <updated>2019-01-07T15:12:43Z</updated>
    <published>2019-01-07T15:12:43Z</published>
    <summary type="html">&lt;p&gt;Can we download code style used for fomatting portal source?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If no, How to replicate similar code style in our custom
  modules/custom code developed.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nagendra&lt;/p&gt;</summary>
    <dc:creator>Nagendra Kumar Busam</dc:creator>
    <dc:date>2019-01-07T15:12:43Z</dc:date>
  </entry>
</feed>
