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

Improve generateEditorConfig example in docs #2436

Merged
merged 2 commits into from
Dec 17, 2023
Merged

Improve generateEditorConfig example in docs #2436

merged 2 commits into from
Dec 17, 2023

Conversation

BD103
Copy link
Contributor

@BD103 BD103 commented Dec 14, 2023

Description

I deleted a duplicate command in the documentation. (ktlint generateEditorConfig) I don't believe it was intentional.

I figured the fix was simple enough that adding an extended description to the commit message is not necessary. I can change this, though.

I added the fix to both the snapshot and release documentations. It's not necessarily pressing enough to need being updated in the release version, but I figured it couldn't do too much harm.

Checklist

Before submitting the PR, please check following (checks which are not relevant may be ignored):

  • Commit message are well written. In addition to a short title, the commit message also explain why a change is made.
  • At least one commit message contains a reference Closes #<xxx> or Fixes #<xxx> (replace<xxx> with issue number)
  • Tests are added
  • KtLint format has been applied on source code itself and violations are fixed
  • PR title is short and clear (it is used as description in the release changelog)
  • PR description added (background information)

Documentation is updated. See difference between snapshot and release documentation

  • Snapshot documentation in case documentation is to be released together with a code change
  • Release documentation in case documentation is related to a released version of ktlint and has to be published as soon as the change is merged to master

@BD103 BD103 marked this pull request as ready for review December 14, 2023 16:57
@paul-dingemans
Copy link
Collaborator

The documentation is indeed not correct. It would be better to change it something like below:

ktlint generateEditorConfig
# or
ktlint generateEditorConfig intellij_idea
# or
ktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig  android_studio```

The idea was that to demonstrate that if no code style is provided that `ktlint_official` is used as default. If you want another code style then you need to provide the id of that code style.

This better demonstrates generating config for different code styles, as per #2436 (comment).
@BD103 BD103 changed the title Remove duplicate generateEditorConfig command in docs Improve generateEditorConfig example in docs Dec 15, 2023
@BD103
Copy link
Contributor Author

BD103 commented Dec 15, 2023

Ok, I've updated the example. :)

@paul-dingemans paul-dingemans merged commit f700bd1 into pinterest:master Dec 17, 2023
11 checks passed
@BD103 BD103 deleted the patch-1 branch December 17, 2023 18:24
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.

2 participants