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

Expose -fix (and -config?) functionality via action #8

Closed
hatamiarash7 opened this issue Mar 22, 2022 · 6 comments
Closed

Expose -fix (and -config?) functionality via action #8

hatamiarash7 opened this issue Mar 22, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@hatamiarash7
Copy link

hatamiarash7 commented Mar 22, 2022

Is there anything ti use fix option from markdownlint-cli2 ???
I want then Action check & fix my codes in the same commit. Something like the one in Prettier Action

- name: Prettify code
  uses: creyD/[email protected]
  with:
    prettier_options: --write **/*.md
    only_changed: True
    same_commit: True

I don't want a simple markdownlint-cli2 "**/*.md" command. We need markdownlint-cli2-fix "**/*.md" here ( Using CLI command, config option, etc )

Note: I Don't want to put a .markdownlint-cli2.jsonc in every repository like this :

{
  "fix": true
}
@DavidAnson
Copy link
Owner

Invoking markdownlint-cli2-fix is not supported today. However, effectively all that does is set the fix flag and run markdownlint-cli2: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2jsonc

Have you tried that?

@DavidAnson DavidAnson added the question Further information is requested label Mar 22, 2022
@hatamiarash7
Copy link
Author

How can I pass the fix flag into Action?

@DavidAnson
Copy link
Owner

@hatamiarash7
Copy link
Author

As I said earlier, I Don't want to put a .markdownlint-cli2.jsonc in every repository. It's a bad idea. We have hundreds of repositories and can't update all of them because of this ( just for a single file ).

In my opinion, the best option is to do the whole process through action, something like this :

- uses: DavidAnson/markdownlint-cli2-action@v5
    with:
      fix: true
      globs: |
        *.md

@DavidAnson
Copy link
Owner

As I said earlier…

You edited your post to say that after I had already replied.

@hatamiarash7
Copy link
Author

That's for some minutes ago, not after your reply ... anyway, Sorry!
Do you have any idea about this?

@DavidAnson DavidAnson added enhancement New feature or request and removed question Further information is requested labels Mar 27, 2022
@DavidAnson DavidAnson changed the title Fix codes Expose -fix (and -config?) functionality via action Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants