-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add args
input
#13
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -52,6 +52,21 @@ To use a specific config, specify that with the `config-path` input: | |||||||||||||
config-path: dprint-ci.json | ||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
### Args | ||||||||||||||
|
||||||||||||||
To pass additional arguments to `dprint check`, pass them to the `args` input. E.g. to only check changed files: | ||||||||||||||
|
||||||||||||||
```yml | ||||||||||||||
- name: Get changed files | ||||||||||||||
id: changed-files | ||||||||||||||
uses: tj-actions/changed-files@v45 | ||||||||||||||
- uses: dprint/[email protected] | ||||||||||||||
with: | ||||||||||||||
args: >- | ||||||||||||||
--allow-no-files | ||||||||||||||
${{ steps.changed-files.outputs.all_changed_files }} | ||||||||||||||
Comment on lines
+65
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I am not familiar with that yaml syntax, does a multi-line string also work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Becomes {"a": "b c\n"}
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use https://yaml-multiline.info/ ~ once per month for silly yaml features like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the problem with dprint check --allow-no-files
file1 file2 ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It is cool and scary at the same time that yaml supports this. Thanks for explaining! |
||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
## Troubleshooting | ||||||||||||||
|
||||||||||||||
### Windows line endings | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is with all this whitespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch