Skip to content

Commit a46b1a3

Browse files
Add checkstyle rule to ensure no whiteline under license header
1 parent b7a389c commit a46b1a3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

espresso/src/com.oracle.truffle.espresso.polyglot/.checkstyle_checks.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
<property name="max" value="250"/>
190190
</module>
191191
<module name="RegexpHeader">
192-
<property name="header" value="/\*\n \* Copyright \(c\) (?:(20[0-9][0-9]), )?(20[0-9][0-9]), Oracle and/or its affiliates\. All rights reserved\.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER\.\n \*\n \* The Universal Permissive License \(UPL\), Version 1\.0\n \*\n \* Subject to the condition set forth below, permission is hereby granted to any\n \* person obtaining a copy of this software, associated documentation and/or\n \* data \(collectively the &quot;Software&quot;\), free of charge and under any and all\n \* copyright rights in the Software, and any and all patent rights owned or\n \* freely licensable by each licensor hereunder covering either \(i\) the\n \* unmodified Software as contributed to or provided by such licensor, or \(ii\)\n \* the Larger Works \(as defined below\), to deal in both\n \*\n \* \(a\) the Software, and\n \*\n \* \(b\) any piece of software and/or hardware listed in the lrgrwrks\.txt file if\n \* one is included with the Software each a &quot;Larger Work&quot; to which the Software\n \* is contributed by such licensors\),\n \*\n \* without restriction, including without limitation the rights to copy, create\n \* derivative works of, display, perform, and distribute the Software and make,\n \* use, sell, offer for sale, import, export, have made, and have sold the\n \* Software and the Larger Work\(s\), and to sublicense the foregoing rights on\n \* either these or other terms\.\n \*\n \* This license is subject to the following condition:\n \*\n \* The above copyright notice and either this complete permission notice or at a\n \* minimum a reference to the UPL must be included in all copies or substantial\n \* portions of the Software\.\n \*\n \* THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n \* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n \* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\. IN NO EVENT SHALL THE\n \* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n \* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n \* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n \* SOFTWARE\.\n \*/\n"/>
192+
<property name="header" value="/\*\n \* Copyright \(c\) (?:(20[0-9][0-9]), )?(20[0-9][0-9]), Oracle and/or its affiliates\. All rights reserved\.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER\.\n \*\n \* The Universal Permissive License \(UPL\), Version 1\.0\n \*\n \* Subject to the condition set forth below, permission is hereby granted to any\n \* person obtaining a copy of this software, associated documentation and/or\n \* data \(collectively the &quot;Software&quot;\), free of charge and under any and all\n \* copyright rights in the Software, and any and all patent rights owned or\n \* freely licensable by each licensor hereunder covering either \(i\) the\n \* unmodified Software as contributed to or provided by such licensor, or \(ii\)\n \* the Larger Works \(as defined below\), to deal in both\n \*\n \* \(a\) the Software, and\n \*\n \* \(b\) any piece of software and/or hardware listed in the lrgrwrks\.txt file if\n \* one is included with the Software each a &quot;Larger Work&quot; to which the Software\n \* is contributed by such licensors\),\n \*\n \* without restriction, including without limitation the rights to copy, create\n \* derivative works of, display, perform, and distribute the Software and make,\n \* use, sell, offer for sale, import, export, have made, and have sold the\n \* Software and the Larger Work\(s\), and to sublicense the foregoing rights on\n \* either these or other terms\.\n \*\n \* This license is subject to the following condition:\n \*\n \* The above copyright notice and either this complete permission notice or at a\n \* minimum a reference to the UPL must be included in all copies or substantial\n \* portions of the Software\.\n \*\n \* THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n \* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n \* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\. IN NO EVENT SHALL THE\n \* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n \* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n \* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n \* SOFTWARE\.\n \*/\n.+"/>
193+
<!-- `.+` at the end ensures that the line after the copyright is not empty (RegexpHeader works line by line) -->
193194
<property name="fileExtensions" value="java"/>
194195
</module>
195196
<module name="FileTabCharacter">

espresso/src/com.oracle.truffle.espresso/.checkstyle_checks.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@
204204
<property name="max" value="250"/>
205205
</module>
206206
<module name="RegexpHeader">
207-
<property name="header" value="/\*\n \* Copyright \(c\) (20[0-9][0-9], )?20[0-9][0-9], Oracle and/or its affiliates\. All rights reserved\.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER\.\n \*\n \* This code is free software; you can redistribute it and/or modify it\n \* under the terms of the GNU General Public License version 2 only, as\n \* published by the Free Software Foundation\.\n \*\n \* This code is distributed in the hope that it will be useful, but WITHOUT\n \* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n \* FITNESS FOR A PARTICULAR PURPOSE\. See the GNU General Public License\n \* version 2 for more details \(a copy is included in the LICENSE file that\n \* accompanied this code\)\.\n \*\n \* You should have received a copy of the GNU General Public License version\n \* 2 along with this work; if not, write to the Free Software Foundation,\n \* Inc\., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\.\n \*\n \* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n \* or visit www\.oracle\.com if you need additional information or have any\n \* questions\.\n \*/\n"/>
207+
<property name="header" value="/\*\n \* Copyright \(c\) (20[0-9][0-9], )?20[0-9][0-9], Oracle and/or its affiliates\. All rights reserved\.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER\.\n \*\n \* This code is free software; you can redistribute it and/or modify it\n \* under the terms of the GNU General Public License version 2 only, as\n \* published by the Free Software Foundation\.\n \*\n \* This code is distributed in the hope that it will be useful, but WITHOUT\n \* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n \* FITNESS FOR A PARTICULAR PURPOSE\. See the GNU General Public License\n \* version 2 for more details \(a copy is included in the LICENSE file that\n \* accompanied this code\)\.\n \*\n \* You should have received a copy of the GNU General Public License version\n \* 2 along with this work; if not, write to the Free Software Foundation,\n \* Inc\., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\.\n \*\n \* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n \* or visit www\.oracle\.com if you need additional information or have any\n \* questions\.\n \*/\n.+"/>
208+
<!-- `.+` at the end ensures that the line after the copyright is not empty (RegexpHeader works line by line) -->
208209
<property name="fileExtensions" value="java"/>
209210
</module>
210211
<module name="FileTabCharacter">

0 commit comments

Comments
 (0)