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

build(style): Add Checkstyle plugin for Gradle #311

Merged
merged 40 commits into from
Nov 16, 2023

Conversation

guicamest
Copy link
Contributor

@guicamest guicamest commented Nov 16, 2023

Issue #300

Description of changes:
This PR adds Checkstyle as part of the build process. The configuration is based on Checkstyle for AWS SDK V2, without some custom checks on for that specific project.

During ./gradlew build, the following tasks are executed:

  • checkstyleMain
  • checkstyleExamples
  • checkstyleTest
  • checkstyleIntegrationTest

For the test sources only the header check is applied.

Given that style is now enforced during build time, many files are formatted / updated 😬 .

TODO

  • Add license of checkstyle ⏸️

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@markjschreiber markjschreiber left a comment

Choose a reason for hiding this comment

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

Thanks for adding in a style checker! A couple of comments.

build.gradle Outdated Show resolved Hide resolved

/**
* Demo class that will read text from S3 URIs that you provide on the command line. Your standard AWS credential chain
* is used for permissions.
*/
public class Main {

private static final Logger logger = LoggerFactory.getLogger(ListPrefix.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use the Main.class logger

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 🥳

@markjschreiber markjschreiber merged commit 8ed83f2 into awslabs:main Nov 16, 2023
1 check passed
@guicamest guicamest deleted the addCheckstyle branch November 16, 2023 23:20
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.

2 participants