The CheckStyle version currently used, 8.30, doesn't support newer Java features such as string blocks. As a result, the plugin fails parsing any class including at least one string block, which makes the Maven build fail as well.
This PR updates the CheckStyle plugin so that:
Newer Java features such as string blocks are properly supported while running CheckStyle on the codebase.
No other changes are required for the project to build:
No changes to checkstyle.xml are required. The latest version that fulfils this criterion is 8.41.1 — versions 8.42 and later require adding a scope attribute.
No existing rules change in their interpretation, i.e. no new CheckStyle errors appear if the code remains unchanged. The latest version that fulfils this criterion is 8.38 — versions 8.39 and later introduce rule and rule interpretation changes, which results in new CheckStyle errors being thrown and failing the build if the codebase remains unchanged.
Therefore, to minimize impact on the existing code, this PR updates CheckStyle to version 8.38.
The CheckStyle version is updated from 8.30 to 8.38 in the project parent pom.xml.
Instructions for Reviewers
Just import the updated pom.xml file and build the project.
The project will still build properly without having to change anything. If a class featuring string blocks is added, it will compile and be "check-styled" without throwing any plugin- or configuration-related exceptions.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
Unchecked boxes below are not applicable to this PR.
[X] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
[X] My PR passes Checkstyle validation based on the Code Style Guide.
[ ] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[X] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[ ] If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[ ] If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
[ ] If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
The CheckStyle version currently used, 8.30, doesn't support newer Java features such as string blocks. As a result, the plugin fails parsing any class including at least one string block, which makes the Maven build fail as well.
This PR updates the CheckStyle plugin so that:
checkstyle.xml
are required. The latest version that fulfils this criterion is 8.41.1 — versions 8.42 and later require adding ascope
attribute.Therefore, to minimize impact on the existing code, this PR updates CheckStyle to version 8.38.
References
https://github.com/DSpace/DSpace/issues/8441
Description
The CheckStyle version is updated from 8.30 to 8.38 in the project parent
pom.xml
.Instructions for Reviewers
Just import the updated
pom.xml
file and build the project.The project will still build properly without having to change anything. If a class featuring string blocks is added, it will compile and be "check-styled" without throwing any plugin- or configuration-related exceptions.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
Unchecked boxes below are not applicable to this PR.
pom.xml
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.