Skip to content

Commit e1f047e

Browse files
author
Guard
committed
Merge pull request #122 from krzyk/116
#122: pull request #116 always use unix line endings instead of system ones
2 parents 5d22e4d + ffc0ed6 commit e1f047e

File tree

8 files changed

+140
-0
lines changed

8 files changed

+140
-0
lines changed

qulice-checkstyle/src/main/resources/com/qulice/checkstyle/checks.xml

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
-->
4949
<module name="NewlineAtEndOfFile">
5050
<property name="fileExtensions" value="java"/>
51+
<property name="lineSeparator" value="lf"/>
5152
</module>
5253

5354
<!--

qulice-maven-plugin/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@
273273
<pomIncludes>
274274
<pomInclude>checkstyle-exceptions/pom.xml</pomInclude>
275275
<pomInclude>checkstyle-violations/pom.xml</pomInclude>
276+
<pomInclude>checkstyle-newlines/pom.xml</pomInclude>
276277
<pomInclude>pmd-violations/pom.xml</pomInclude>
277278
<pomInclude>codenarc-violations/pom.xml</pomInclude>
278279
<pomInclude>findbugs-violations/pom.xml</pomInclude>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2011-2013, Qulice.com
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met: 1) Redistributions of source code must retain the above
7+
copyright notice, this list of conditions and the following
8+
disclaimer. 2) Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution. 3) Neither the name of the Qulice.com nor
12+
the names of its contributors may be used to endorse or promote
13+
products derived from this software without specific prior written
14+
permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
18+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
20+
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27+
OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
invoker.goals = clean verify
2+
invoker.buildResult = failure
3+
invoker.mavenOpts=-Dline.separator=\r\n
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
*
4+
* Copyright (c) 2011-2013, Qulice.com
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions
9+
* are met: 1) Redistributions of source code must retain the above
10+
* copyright notice, this list of conditions and the following
11+
* disclaimer. 2) Redistributions in binary form must reproduce the above
12+
* copyright notice, this list of conditions and the following
13+
* disclaimer in the documentation and/or other materials provided
14+
* with the distribution. 3) Neither the name of the Qulice.com nor
15+
* the names of its contributors may be used to endorse or promote
16+
* products derived from this software without specific prior written
17+
* permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
21+
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22+
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23+
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30+
* OF THE POSSIBILITY OF SUCH DAMAGE.
31+
*
32+
* @version $Id$
33+
-->
34+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
35+
<modelVersion>4.0.0</modelVersion>
36+
<groupId>com.qulice.plugin</groupId>
37+
<artifactId>checkstyle-newlines</artifactId>
38+
<version>1.0-SNAPSHOT</version>
39+
<packaging>jar</packaging>
40+
<name>checkstyle-newlines</name>
41+
<prerequisites>
42+
<maven>3.0</maven>
43+
</prerequisites>
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>com.qulice</groupId>
48+
<artifactId>qulice-maven-plugin</artifactId>
49+
<version>@project.version@</version>
50+
<configuration>
51+
<license>file:${basedir}/LICENSE.txt</license>
52+
</configuration>
53+
<executions>
54+
<execution>
55+
<goals>
56+
<goal>check</goal>
57+
</goals>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
</plugins>
62+
</build>
63+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.qulice.plugin.violations;
2+
public class Violations {
3+
public void test() {
4+
System.setProperty("test", "test value");
5+
}
6+
}
7+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file contains a tab.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
*
3+
* Copyright (c) 2011, Qulice.com
4+
* All rights reserved.
5+
*
6+
* Redistribution and use in source and binary forms, with or without
7+
* modification, are permitted provided that the following conditions
8+
* are met: 1) Redistributions of source code must retain the above
9+
* copyright notice, this list of conditions and the following
10+
* disclaimer. 2) Redistributions in binary form must reproduce the above
11+
* copyright notice, this list of conditions and the following
12+
* disclaimer in the documentation and/or other materials provided
13+
* with the distribution. 3) Neither the name of the Qulice.com nor
14+
* the names of its contributors may be used to endorse or promote
15+
* products derived from this software without specific prior written
16+
* permission.
17+
*
18+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
20+
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21+
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22+
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29+
* OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*
31+
* @version $Id$
32+
*
33+
* Validate that the build really failed and violations were reported.
34+
*/
35+
36+
def log = new File(basedir, 'build.log')
37+
assert !log.text.contains('(NewlineAtEndOfFileCheck)')

0 commit comments

Comments
 (0)