Skip to content

Commit

Permalink
PDFBOX-5869: introduce project checkstyle, remove checkstyle from xmpbox
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1919975 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Aug 17, 2024
1 parent 6477c75 commit 0918f99
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 9 deletions.
65 changes: 65 additions & 0 deletions parent/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>

<module name="SuppressionSingleFilter">
<property name="checks" value="RegexpHeader"/>
<property name="files" value="(CCITTFax..coderStream.java)|(TIFFExtension.java)"/>
</module>

<!-- the exact test will be done in the rat plugin -->
<!-- does not work fully (problem with xmpbox and I don't want to change every file
<module name="RegexpHeader">
<property name="header"
value="^.*$\n.*Apache Software Foundation.*$"/>
</module>
-->

<module name="LineLength">
<property name="max" value="200"/> <!-- TODO reduce when the worst cases are fixed -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>

<module name="TreeWalker">
<!--<module name="FileContentsHolder"/>-->
<module name="IllegalImport">
<property name="regexp" value="true"/>
<!-- Reject any org.junit import that's not also org.junit.jupiter: -->
<property name="illegalClasses" value="^org\.junit\.(?!jupiter\.).+"/>
</module>
<module name="OuterTypeFilename"/>
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="OuterTypeFilename"/>
<!--
<module name="OneTopLevelClass"/>
<module name="LeftCurly"/>
-->
</module>
</module>
4 changes: 3 additions & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<skip>true</skip>
<skip>${skipTests}</skip>
<configLocation>checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
<plugin>
Expand Down
8 changes: 0 additions & 8 deletions xmpbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>../pdfbox-checkstyle-5.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 0918f99

Please sign in to comment.