Skip to content

Commit e6fa593

Browse files
committed
included checkstyle source code conventions
1 parent 88146c6 commit e6fa593

29 files changed

+445
-403
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ This is a test ~senctence~**for diffutils**.
5050
But it can easily replaced by any other which is better for handing your texts. I have plan to add implementation of some in future.
5151

5252
### Changelog ###
53+
* Version 2.1-SNAPSHOT
54+
* included checkstyle source code conventions
5355
* Version 2.0
5456
* switch to maven and removed other artifacts
5557
* changed groupid to **com.github.java-diff-utils** due to different forks at github
@@ -66,6 +68,26 @@ But it can easily replaced by any other which is better for handing your texts.
6668
* Ant build script
6769
* Generate output in unified diff format (thanks for Bill James)
6870

71+
## Source Code conventions
72+
73+
Recently a checkstyle process was integrated into the build process. JSqlParser follows the sun java format convention. There are no TABs allowed. Use spaces.
74+
75+
```java
76+
public static <T> Patch<T> diff(List<T> original, List<T> revised,
77+
BiPredicate<T, T> equalizer) throws DiffException {
78+
if (equalizer != null) {
79+
return DiffUtils.diff(original, revised,
80+
new MyersDiff<>(equalizer));
81+
}
82+
return DiffUtils.diff(original, revised, new MyersDiff<>());
83+
}
84+
```
85+
86+
This is a valid piece of source code:
87+
* blocks without braces are not allowed
88+
* after control statements (if, while, for) a whitespace is expected
89+
* the opening brace should be in the same line as the control statement
90+
6991
### To Install ###
7092

7193
**This jar is not yet to get at maven central.**

java-diff-utils.iml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
4-
<output url="file://$MODULE_DIR$/target/classes" />
5-
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6-
<exclude-output />
7-
<content url="file://$MODULE_DIR$">
8-
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
9-
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10-
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
11-
<excludeFolder url="file://$MODULE_DIR$/build" />
12-
<excludeFolder url="file://$MODULE_DIR$/dist" />
13-
<excludeFolder url="file://$MODULE_DIR$/target" />
14-
</content>
15-
<orderEntry type="inheritedJdk" />
16-
<orderEntry type="sourceFolder" forTests="false" />
17-
<orderEntry type="module-library">
18-
<library>
19-
<CLASSES>
20-
<root url="jar://$MODULE_DIR$/lib/junit.jar!/" />
21-
</CLASSES>
22-
<JAVADOC />
23-
<SOURCES />
24-
</library>
25-
</orderEntry>
26-
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.1" level="project" />
27-
</component>
28-
</module>
29-
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
4+
<output url="file://$MODULE_DIR$/target/classes" />
5+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6+
<exclude-output />
7+
<content url="file://$MODULE_DIR$">
8+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
9+
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10+
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
11+
<excludeFolder url="file://$MODULE_DIR$/build" />
12+
<excludeFolder url="file://$MODULE_DIR$/dist" />
13+
<excludeFolder url="file://$MODULE_DIR$/target" />
14+
</content>
15+
<orderEntry type="inheritedJdk" />
16+
<orderEntry type="sourceFolder" forTests="false" />
17+
<orderEntry type="module-library">
18+
<library>
19+
<CLASSES>
20+
<root url="jar://$MODULE_DIR$/lib/junit.jar!/" />
21+
</CLASSES>
22+
<JAVADOC />
23+
<SOURCES />
24+
</library>
25+
</orderEntry>
26+
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.1" level="project" />
27+
</component>
28+
</module>
29+

nb-configuration.xml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project-shared-configuration>
3-
<!--
4-
This file contains additional configuration written by modules in the NetBeans IDE.
5-
The configuration is intended to be shared among all the users of project and
6-
therefore it is assumed to be part of version control checkout.
7-
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8-
-->
9-
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10-
<!--
11-
Properties that influence various parts of the IDE, especially code formatting and the like.
12-
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13-
That way multiple projects can share the same settings (useful for formatting rules for example).
14-
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15-
-->
16-
<netbeans.compile.on.save>none</netbeans.compile.on.save>
17-
<com-junichi11-netbeans-changelf.enable>false</com-junichi11-netbeans-changelf.enable>
18-
<com-junichi11-netbeans-changelf.use-project>true</com-junichi11-netbeans-changelf.use-project>
19-
<com-junichi11-netbeans-changelf.lf-kind>LF</com-junichi11-netbeans-changelf.lf-kind>
20-
<com-junichi11-netbeans-changelf.use-global>false</com-junichi11-netbeans-changelf.use-global>
21-
</properties>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<netbeans.compile.on.save>none</netbeans.compile.on.save>
17+
<com-junichi11-netbeans-changelf.enable>false</com-junichi11-netbeans-changelf.enable>
18+
<com-junichi11-netbeans-changelf.use-project>true</com-junichi11-netbeans-changelf.use-project>
19+
<com-junichi11-netbeans-changelf.lf-kind>LF</com-junichi11-netbeans-changelf.lf-kind>
20+
<com-junichi11-netbeans-changelf.use-global>false</com-junichi11-netbeans-changelf.use-global>
21+
</properties>
2222
</project-shared-configuration>

0 commit comments

Comments
 (0)