Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checker header in checkstyle #216

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD License

Copyright (c) 2000-2015 www.hamcrest.org
Copyright (c) 2000-2022 www.hamcrest.org
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 2 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'signing'
apply plugin: 'checkstyle'
apply plugin: 'osgi'
apply plugin: 'maven-publish'

Expand All @@ -21,10 +22,7 @@ subprojects {

checkstyle {

project.ext.checkstyleVersion = '6.18'
//works with a JDK 7 version which is supposed to be supported although
//deprecated, see https://github.com/hamcrest/JavaHamcrest/pull/211 for
//the discussion about the support
project.ext.checkstyleVersion = '8.41'

sourceSets = [ project.sourceSets.main, project.sourceSets.test ]
ignoreFailures = false
Expand Down
12 changes: 10 additions & 2 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Checks that there are no tab characters ('\t') in the source code. -->
<module name="FileTabCharacter">
<!-- Report on each line in each file -->
<property name="eachLine" value="true"/>
</module>
<!-- Following interprets the header file as regular expressions. -->
<!-- Due to the fact that checkstyle only seems to be able to (re)use text from a license file if no text stands before the header in the source code and the fact that variable text is used in the header (package name), use the `RegexpHeader` module to validate the headers -->
<module name="RegexpHeader">
<property
name="header"
value="^/\*\*\n \* Copyright \(c\) 2000-2022 www.hamcrest.org. All rights reserved.\n \*\n \* This work is licensed under the terms of the BSD license.\n \* For a copy, see LICENSE.txt in this repository.\n\*/\n"/>
<property name="fileExtensions" value="java"/>
</module>
</module>
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.core.deprecated;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/

/**
* All classes in <code>hamcrest-core.jar</code> have been migrated to
* <code>hamcrest.jar</code>. Please use that dependency instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.integration.EasyMock2Adapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.integration.JMock1Adapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.integration;

import org.easymock.IArgumentMatcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.integration;

import org.jmock.core.Constraint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.library.deprecated;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/

/**
* All classes in <code>hamcrest-library.jar</code> have been migrated to
* <code>hamcrest.jar</code>. Please use that dependency instead.
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/BaseDescription.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.internal.ArrayIterator;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/BaseMatcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/Condition.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/CoreMatchers.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.core.IsIterableContaining;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/CustomMatcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;


Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/Description.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/DiagnosingMatcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/FeatureMatcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.internal.ReflectiveTypeFinder;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/Matcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/MatcherAssert.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;


Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/Matchers.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.collection.ArrayMatching;
Expand Down
8 changes: 7 additions & 1 deletion hamcrest/src/main/java/org/hamcrest/SelfDescribing.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

/**
Expand All @@ -13,4 +19,4 @@ public interface SelfDescribing {
* The description to be built or appended to.
*/
void describeTo(Description description);
}
}
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/StringDescription.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.internal.ReflectiveTypeFinder;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/TypeSafeMatcher.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest;

import org.hamcrest.internal.ReflectiveTypeFinder;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/beans/HasProperty.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.beans;

import org.hamcrest.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.beans;

import org.hamcrest.Condition;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/beans/PropertyUtil.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.beans;

import java.beans.IntrospectionException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.beans;

import org.hamcrest.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.collection;

import org.hamcrest.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.collection;

import org.hamcrest.Matcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.collection;

import org.hamcrest.Description;
Expand Down
6 changes: 6 additions & 0 deletions hamcrest/src/main/java/org/hamcrest/collection/IsArray.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.collection;

import org.hamcrest.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Copyright (c) 2000-2022 www.hamcrest.org. All rights reserved.
*
* This work is licensed under the terms of the BSD license.
* For a copy, see LICENSE.txt in this repository.
*/
package org.hamcrest.collection;

import org.hamcrest.Description;
Expand Down
Loading