Skip to content

Add remark lint #770

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

AlexWayfer
Copy link
Contributor

@AlexWayfer AlexWayfer commented May 12, 2021

For Markdown files.

Main motivation was dollar sign in code blocks which is redundant.

  1. This is well described in the Markdown Style Guide
    (which default we're using now).
  2. Input symbol is configurable, for example, I have >.
  3. Some commands can require root access on some systems,
    like docker on Arch Linux without additional actions,
    and there is should be #, but it's pretty conditional.
  4. There is GitHub new "Copy to clipboard" buttons for code blocks,
    and any symbol but command interferes into simple process.

@colby-swandale
Copy link
Member

Main motivation was dollar sign in code blocks which is redundant.

Sorry but I disagree with this point, it's very common to use $ to denote a terminal command. See projects like aws-cli, homebrew etc

@AlexWayfer
Copy link
Contributor Author

Main motivation was dollar sign in code blocks which is redundant.

Sorry but I disagree with this point, it's very common to use $ to denote a terminal command. See projects like aws-cli, homebrew etc

I've already mentioned why it's not complete correct. Also I forgot about 4th point: GitHub has now "Copy to clipboard" button, and I could not just press it and paste into terminal to start a local copy of RubyAPI, I had to select manually.

This approach is not too popular yet, new shells (like zsh, fish, etc.) are just incoming in our life, as well as "Copy to clipboard" buttons. If you want examples, I made a small research:

Often it correlates with a documentation creation date, old docs remain with $.

@colby-swandale
Copy link
Member

Often it correlates with a documentation creation date, old docs remain with $.

Again, this seems more like a personal take than something that's now a general assumption to most developers, but I'm happy to remove the $ anyway so that "Copy to Clipboard" works.

Going through the PR, I struggle to see the need to introduce a markdown linter. If there was a blog and we were writing lots of markdown files from different contributors, I would certainly see the usefulness of having one, but this project only has 3 Markdown files which rarely change.

@AlexWayfer
Copy link
Contributor Author

Going through the PR, I struggle to see the need to introduce a markdown linter. If there was a blog and we were writing lots of markdown files from different contributors, I would certainly see the usefulness of having one, but this project only has 3 Markdown files which rarely change.

But when it changes — it's better to be in the same rules as existing content.

After #776, which I highly support, I can introduce a new job with files change check. I don't think it'll complicate somehow significantly a dev workflow.

@AlexWayfer AlexWayfer marked this pull request as draft May 24, 2021 19:03
For Markdown files.

Main motivation was dollar sign in code blocks which is redundant.

1.  This is well described in the [Markdown Style Guide](https://cirosantilli.com/markdown-style-guide/#dollar-signs-in-shell-code)
    (which default we're using now).
2.  Input symbol is configurable, for example, I have `>`.
3.  Some commands can require root access on some systems,
    like `docker` on Arch Linux without additional actions,
    and there is should be `#`, but it's pretty conditional.
4.  There is GitHub new "Copy to clipboard" buttons for code blocks,
    and any symbol but command interferes into simple process.
steps:
- uses: actions/checkout@v2

- uses: dorny/paths-filter@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw somewhere a syntax for semi-native GH Actions conditions, but lost it and didn't find.

pull_request:
types:
- opened
- synchronize
paths-ignore:
- '**.md'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can use conditions for Ruby jobs later, but there is no simple way with current GH Actions syntax:

  • As I understand, if changed_files != 'markdown' will skip Ruby job for commits with Ruby files and Markdown (or other non-related) files.
  • But enumeration of all related to Ruby jobs files can be huge.

@AlexWayfer AlexWayfer marked this pull request as ready for review May 24, 2021 19:28
@colby-swandale
Copy link
Member

@AlexWayfer 👋🏻 I have looked at this PR again and changed my mind since my last comment. I would like to see this change merged. If you can rebase this branch, I will work on getting this merged. Thank you.

@AlexWayfer
Copy link
Contributor Author

@AlexWayfer 👋🏻 I have looked at this PR again and changed my mind since my last comment. I would like to see this change merged. If you can rebase this branch, I will work on getting this merged. Thank you.

Great to hear it. I'll try after (new) basic issues like #1139 (don't hurry up anyone).

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