Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: is there a way to tell write-good to ignore code blocks?

See original GitHub issue

Hi! 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.


Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

blueyedcommented, Apr 26, 2017

@jputrino Speaking out of experience: a PR would always help!

tykealcommented, Aug 18, 2020

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

# yamllint disable rule:line-length
a very long line (not that this is since it's just an example)
# yamllint enable
# this re-enables that _last_ disabled rule as the disablement seems to be done as a stack

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found