Skip to content

Standardize java source headers #7205

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

Merged
merged 5 commits into from
Mar 5, 2021
Merged

Standardize java source headers #7205

merged 5 commits into from
Mar 5, 2021

Conversation

benjamintboyle
Copy link
Contributor

@benjamintboyle benjamintboyle commented Mar 5, 2021

Convert License headers to block comments instead of dangling Javadoc comments. Use Checkstyle to validate Java source files have Licenses attached. Updated Checkstyle to most recent version. Updated Checkstyle configuration to remove mostly commented out code and update to correct DTD.

Removed unit test FixLicenseHeaders as the functionality is handled by the Checkstyle header validation.

One commit is Checkstyle and Gradle updates. Second commit is for all the Java source License updates.

Fixes #7204

Update Checkstyle to validate all java source files have a standard
header. Remove FixLiscenseHeaders.java unit test as it duplicates
Checkstyle functionality. Standard header is block java comment, instead
of dangling Javadoc comment. Create standard header template
(HEADER_JAVA) in project root. Reference header template in
build.gradle. Update CONTRIBUTING.md to exact text of header template.
Standardize License based off of HEADER_JAVA file. All headers are block
Java comments.
@akarnokd
Copy link
Member

akarnokd commented Mar 5, 2021

Please don't remove the FixLicenseHeaders.

@akarnokd
Copy link
Member

akarnokd commented Mar 5, 2021

Also please do not change the license start date, it should be 2016.

@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #7205 (4965cb4) into 3.x (a4e087d) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #7205      +/-   ##
============================================
- Coverage     99.54%   99.53%   -0.01%     
- Complexity     6757     6758       +1     
============================================
  Files           747      747              
  Lines         47387    47387              
  Branches       6384     6384              
============================================
- Hits          47170    47167       -3     
- Misses           99      101       +2     
- Partials        118      119       +1     
Impacted Files Coverage Δ Complexity Δ
...eactivex/rxjava3/annotations/BackpressureKind.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...vex/rxjava3/core/BackpressureOverflowStrategy.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...o/reactivex/rxjava3/core/BackpressureStrategy.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...in/java/io/reactivex/rxjava3/core/Completable.java 100.00% <ø> (ø) 140.00 <0.00> (ø)
.../main/java/io/reactivex/rxjava3/core/Flowable.java 100.00% <ø> (ø) 597.00 <0.00> (ø)
src/main/java/io/reactivex/rxjava3/core/Maybe.java 100.00% <ø> (ø) 214.00 <0.00> (ø)
...n/java/io/reactivex/rxjava3/core/Notification.java 100.00% <ø> (ø) 23.00 <0.00> (ø)
...ain/java/io/reactivex/rxjava3/core/Observable.java 100.00% <ø> (ø) 565.00 <0.00> (ø)
...main/java/io/reactivex/rxjava3/core/Scheduler.java 100.00% <ø> (ø) 16.00 <0.00> (ø)
...rc/main/java/io/reactivex/rxjava3/core/Single.java 100.00% <ø> (ø) 196.00 <0.00> (ø)
... and 230 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4e087d...4965cb4. Read the comment docs.

@benjamintboyle
Copy link
Contributor Author

Will fix. Do you have an issue with the header validation in Checkstyle being an error as I have it, or should I change it to a warning? I saw in comments on other commits that errors might not be welcome from Checkstyle.

@benjamintboyle
Copy link
Contributor Author

Also should all the Licenses have a 2016 date? I saw a handful of them that had different dates (i.e. 2017).

Several files had 2017 dates for License. Checkstyle now specifically
looks for 2016 date in License comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.x: Convert License from dangling Javadoc to block comment
2 participants