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

Fix #3394: Ktlint Custom RuleSet #5558

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

manas-yu
Copy link

@manas-yu manas-yu commented Oct 24, 2024

Fix: #3394
This PR introduces two key features:

  • Custom Ruleset Provider: A new custom ruleset provider is implemented, allowing the integration of custom Ktlint rules.

  • KDocFormatRule: The KDocFormatRule is added to enforce correct closing syntax in KDoc comments.

To create the JAR file for the custom ruleset:
gradlew.bat :utility:customRulesJar

Use the custom ruleset with Ktlint by executing:
ktlint --ruleset=../oppia-android-tools/custom-ktlint-rules.jar "path/to/file"

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

@manas-yu manas-yu requested a review from a team as a code owner October 24, 2024 08:26
@adhiamboperes adhiamboperes self-assigned this Oct 24, 2024
@manas-yu
Copy link
Author

@adhiamboperes PTAL, i will integrate the custom rules into scripts too.
please review and tell if there is anything else to do.

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.

Ktlint check comment block
2 participants