Question: is there a way to tell write-good to ignore code blocks?
See original GitHub issueHi! Tech writer here, so please excuse if there is an obvious answer that I’m just not aware of. I’m using write-good
in a bash script to test my documentation before publishing and am getting ‘failures’ based on content in code blocks. I’d like to be able to tell it to skip these instead.
Example: This code block:
::
user@foo# show bar
bar monitor http server-app4_10.128.10.240_8080 {
… causes this write-good
result:
bar monitor http server-app4_10.128.10.240_8080 {
^^^
"bar" is repeated on line 220 at column 9
I’m also not sure if this might be an issue with write-good
, since the word it flags as a duplicate is on a new line.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Best practices for writing code comments - Stack Overflow Blog
Best practices for writing code comments · Rule 1: Comments should not duplicate the code. · Rule 2: Good comments do not excuse...
Read more >c# - Parse URLs using Regex, Ignoring Code Blocks and ...
I am looking to update this regex to ignore URLs inside of markdown code blocks and markdown code snippets. Example 1. The following...
Read more >Survey Questions: Tips & Examples in 2022 - Qualtrics
In this article, we'll share how to write survey questionnaires and list some common errors to avoid so you can improve your surveys...
Read more >Comments in Python: Why are They Important And How to ...
Check out ✔️ what comments are ✔️ their advantages ✔️ types of comments, ... statement of code, or as a multi-line comment block....
Read more >Markdown Code Reviews - Code With Engineering Playbook
The Write Good Linter Extension integrates with VS Code to give grammar and language advice ... markdown-link-check: runs-on: ubuntu-latest steps: - uses: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jputrino Speaking out of experience: a PR would always help!
Instead of opening a new issue, just to have it closed as a duplicate, I figured I would ask on the issue that is still open and semi-relevant.
Is there a way to dynamically disable / enable checks in the files themselves? This would be something that would be useful for all the folks asking for detecting code blocks and such.
For instance with ShellCheck you can have preceding comment lines that have a directive similar to:
# shellcheck disable=SC2086
Which would disable the double quote check on the next line.
With yamllint you can do things like:
# yamllint disable-line rule:line-length
which disable the rule for the next line or
Which allows you to disable for a block / till the end of the file if the enable is never added back.
Having a comment disable / enable method that supports single line and block would resolve these issues for everyone and also make the tool more flexible.