Skip to content

IGNITE-21467: improvements for pmd and checkstyle rules#3239

Merged
PakhomovAlexander merged 5 commits intoapache:mainfrom
unisonteam:IGNITE-21467
Feb 27, 2024
Merged

IGNITE-21467: improvements for pmd and checkstyle rules#3239
PakhomovAlexander merged 5 commits intoapache:mainfrom
unisonteam:IGNITE-21467

Conversation

@dant3
Copy link
Copy Markdown
Contributor

@dant3 dant3 commented Feb 20, 2024

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@dant3 dant3 changed the title IGNITE-21467: imrovements for and pmd, checkstyle rules IGNITE-21467: imrovements for pmd and checkstyle rules Feb 20, 2024
<property name="tokens" value="SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN"/>
</module>
<!-- Comments should start with space -->
<module name="TodoComment">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wonder why it is called TodoComment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wonder why it is called TodoComment.

The original CheckStyle rule itself is for checking if there are any TODO in your comments, and if there are, it issues a warning. We use custom regexp for that rule to check if comment starts with something but space, instead of checking if it contains TODO

@PakhomovAlexander
Copy link
Copy Markdown
Contributor

We try to follow this pattern in git comment message:

IGNITE-21467 Improve pmd and checkstyle rules

* Allows us to upgrade to PMD 7 in the future
* A few cases which was marked by pmd EmptyControlStatement were suppressed due to:
  > we have some cases when an empty statement is allowed.
* fixes or suppresses violations found depending on situation
* According to Apache code style poliies comments should start with space.
* Exception is made for visual separator comments:
  * starting with ---
  * starting with ===
  * CHECKSTYLE:ON
@ibessonov ibessonov changed the title IGNITE-21467: imrovements for pmd and checkstyle rules IGNITE-21467: improvements for pmd and checkstyle rules Feb 21, 2024
# Conflicts:
#	modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/AlterTableDropColumnCommand.java
#	modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
#	modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItTableScanTest.java
#	modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/CastResolutionTest.java
#	modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/AbstractHashIndexStorageTest.java
#	modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java
@PakhomovAlexander PakhomovAlexander merged commit fd3538c into apache:main Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants