Showing 40 of 40 total issues
Non-idiomatic code found in (apply str accum)
Open
(apply str accum)
- Read upRead up
- Exclude checks
Consider using:
(clojure.string/join accum)
instead of:
(apply str accum)
Headers should be surrounded by blank lines Open
### Full /v2.0/current Response, For Reference
- Read upRead up
- Exclude checks
MD022 - Headers should be surrounded by blank lines
Tags: headers, blank_lines
Aliases: blanks-around-headers
This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:
# Header 1
Some text
Some more text
## Header 2
To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):
# Header 1
Some text
Some more text
## Header 2
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.
Multiple top level headers in the same document Open
# Next Steps
- Read upRead up
- Exclude checks
MD025 - Multiple top level headers in the same document
Tags: headers
Aliases: single-h1
Parameters: level (number; default 1)
This rule is triggered when a top level header is in use (the first line of the file is a h1 header), and more than one h1 header is in use in the document:
# Top level header
# Another top level header
To fix, structure your document so that there is a single h1 header that is the title for the document, and all later headers are h2 or lower level headers:
# Title
## Header
## Another header
Rationale: A top level header is a h1 on the first line of the file, and serves as the title for the document. If this convention is in use, then there can not be more than one title for the document, and the entire document should be contained within this header.
Note: The level
parameter can be used to change the top level (ex: to h2) in
cases where an h1 is added externally.
Non-idiomatic code found in (into [] (search-via-scrape q 1))
Open
(let [initial-memes (into [] (search-via-scrape q 1))]
- Read upRead up
- Exclude checks
Consider using:
(vec (search-via-scrape q 1))
instead of:
(into [] (search-via-scrape q 1))
Non-idiomatic code found in (-> (reduce (fn [return-set emoji] (let [tag-vector (:tags emoji) tag-hash-set (set tag-vector)] (clojure.set/union return-set tag-hash-set))) #{} emojis) sort)
Open
(-> (reduce (fn [return-set emoji]
- Read upRead up
- Exclude checks
Consider using:
(sort
(reduce
(fn [return-set emoji]
(let [tag-vector (:tags emoji) tag-hash-set (set tag-vector)]
(clojure.set/union return-set tag-hash-set)))
#{}
emojis))
instead of:
(-> (reduce
(fn [return-set emoji]
(let [tag-vector (:tags emoji) tag-hash-set (set tag-vector)]
(clojure.set/union return-set tag-hash-set)))
#{}
emojis)
sort)
Non-idiomatic code found in (if (re-find slur-re s) s nil)
Open
(if (re-find slur-re s) s nil))
- Read upRead up
- Exclude checks
Consider using:
(when (re-find slur-re s) s)
instead of:
(if (re-find slur-re s) s nil)
Non-idiomatic code found in (-> (jsoup/get-elems mt-box "a img") (jsoup/get-attr "src"))
Open
url (-> (jsoup/get-elems mt-box "a img")
- Read upRead up
- Exclude checks
Consider using:
(jsoup/get-attr (jsoup/get-elems mt-box "a img") "src")
instead of:
(-> (jsoup/get-elems mt-box "a img") (jsoup/get-attr "src"))
Multiple consecutive blank lines Open
- Read upRead up
- Exclude checks
MD012 - Multiple consecutive blank lines
Tags: whitespace, blank_lines
Aliases: no-multiple-blanks
This rule is triggered when there are multiple consecutive blank lines in the document:
Some text here
Some more text here
To fix this, delete the offending lines:
Some text here
Some more text here
Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.
Non-idiomatic code found in (-> (time/to-time-zone (time/now) (time/time-zone-for-id local-tz)) time/hour)
Open
(let [hour (-> (time/to-time-zone (time/now) (time/time-zone-for-id local-tz))
- Read upRead up
- Exclude checks
Consider using:
(time/hour
(time/to-time-zone (time/now) (time/time-zone-for-id local-tz)))
instead of:
(-> (time/to-time-zone (time/now) (time/time-zone-for-id local-tz))
time/hour)
Bare URL used Open
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
- Read upRead up
- Exclude checks
MD034 - Bare URL used
Tags: links, url
Aliases: no-bare-urls
This rule is triggered whenever a URL is given that isn't surrounded by angle brackets:
For more information, see http://www.example.com/.
To fix this, add angle brackets around the URL:
For more information, see <http:></http:>.
Rationale: Without angle brackets, the URL isn't converted into a link in many markdown parsers.
Note: if you do want a bare URL without it being converted into a link, enclose it in a code block, otherwise in some markdown parsers it will be converted:
`http://www.example.com`
Fenced code blocks should be surrounded by blank lines Open
```
- Read upRead up
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.
Emphasis used instead of a header Open
*...or "Choosing A New Weather API"*
- Read upRead up
- Exclude checks
MD036 - Emphasis used instead of a header
Tags: headers, emphasis
Parameters: punctuation (string; default ".,;:!?")
Aliases: no-emphasis-as-header
This check looks for instances where emphasized (i.e. bold or italic) text is used to separate sections, where a header should be used instead:
**My document**
Lorem ipsum dolor sit amet...
_Another section_
Consectetur adipiscing elit, sed do eiusmod.
To fix this, use markdown headers instead of emphasized text to denote sections:
# My document
Lorem ipsum dolor sit amet...
## Another section
Consectetur adipiscing elit, sed do eiusmod.
Note: this rule looks for single line paragraphs that consist entirely of emphasized text. It won't fire on emphasis used within regular text, multi-line emphasized paragraphs, and paragraphs ending in punctuation. Similarly to rule MD026, you can configure what characters are recognized as punctuation.
Non-idiomatic code found in (if (or (empty? description) (coll? description)) nil (str description))
Open
(if-let [sanitized-desc (if (or (empty? description)
- Read upRead up
- Exclude checks
Consider using:
(when-not (or (empty? description) (coll? description))
(str description))
instead of:
(if (or (empty? description) (coll? description)) nil (str description))
Fenced code blocks should be surrounded by blank lines Open
```
- Read upRead up
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.
Non-idiomatic code found in (->> (.list (clojure.core/deref storage-client) (into-array [(Storage$BucketListOption/pageSize 100)])) .iterateAll)
Open
(for [b (->> (.list @storage-client
- Read upRead up
- Exclude checks
Consider using:
(.iterateAll
(.list
@storage-client
(into-array [(Storage$BucketListOption/pageSize 100)])))
instead of:
(->>
(.list
@storage-client
(into-array [(Storage$BucketListOption/pageSize 100)]))
.iterateAll)
Fenced code blocks should be surrounded by blank lines Open
```
- Read upRead up
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.
Multiple consecutive blank lines Open
- Read upRead up
- Exclude checks
MD012 - Multiple consecutive blank lines
Tags: whitespace, blank_lines
Aliases: no-multiple-blanks
This rule is triggered when there are multiple consecutive blank lines in the document:
Some text here
Some more text here
To fix this, delete the offending lines:
Some text here
Some more text here
Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.
Multiple consecutive blank lines Open
- Read upRead up
- Exclude checks
MD012 - Multiple consecutive blank lines
Tags: whitespace, blank_lines
Aliases: no-multiple-blanks
This rule is triggered when there are multiple consecutive blank lines in the document:
Some text here
Some more text here
To fix this, delete the offending lines:
Some text here
Some more text here
Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.
Multiple top level headers in the same document Open
# US National Weather Service API
- Read upRead up
- Exclude checks
MD025 - Multiple top level headers in the same document
Tags: headers
Aliases: single-h1
Parameters: level (number; default 1)
This rule is triggered when a top level header is in use (the first line of the file is a h1 header), and more than one h1 header is in use in the document:
# Top level header
# Another top level header
To fix, structure your document so that there is a single h1 header that is the title for the document, and all later headers are h2 or lower level headers:
# Title
## Header
## Another header
Rationale: A top level header is a h1 on the first line of the file, and serves as the title for the document. If this convention is in use, then there can not be more than one title for the document, and the entire document should be contained within this header.
Note: The level
parameter can be used to change the top level (ex: to h2) in
cases where an h1 is added externally.
Non-idiomatic code found in (-> (f/formatter "yyyy-MM-dd HH:mm:ss") (f/with-zone (time/default-time-zone)))
Open
(-> (f/formatter "yyyy-MM-dd HH:mm:ss")
- Read upRead up
- Exclude checks
Consider using:
(f/with-zone
(f/formatter "yyyy-MM-dd HH:mm:ss")
(time/default-time-zone))
instead of:
(-> (f/formatter "yyyy-MM-dd HH:mm:ss")
(f/with-zone (time/default-time-zone)))