Skip to content

Support triple quoted strings in default value of config delegate - #3733

Merged
schalkms merged 1 commit into
detekt:mainfrom
marschwar:rule-collector-multiline
May 4, 2021
Merged

Support triple quoted strings in default value of config delegate#3733
schalkms merged 1 commit into
detekt:mainfrom
marschwar:rule-collector-multiline

Conversation

@marschwar

Copy link
Copy Markdown
Contributor

This fixes the documentation generation for triple quoted default values in config delegates. This is particularly useful when it comes to regular expressions.

Previously the generated documentation for

@Configuration("description")
private val prop : String by config("""([.?!][ \t\n\r\f<])|([.?!:]$)""")

was incorrect. It was necessary to write

@Configuration("description")
private val prop : String by config("([.?!][ \\t\\n\\r\\f<])|([.?!:]\$)")

@codecov

codecov Bot commented May 2, 2021

Copy link
Copy Markdown

Codecov Report

Merging #3733 (13de1aa) into main (50b453b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #3733   +/-   ##
=========================================
  Coverage     78.04%   78.04%           
  Complexity     2883     2883           
=========================================
  Files           473      473           
  Lines          9300     9300           
  Branches       1767     1767           
=========================================
  Hits           7258     7258           
  Misses         1078     1078           
  Partials        964      964           
Impacted Files Coverage Δ Complexity Δ
...urbosch/detekt/generator/collection/Annotations.kt 71.42% <100.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50b453b...13de1aa. Read the comment docs.

@cortinico cortinico added this to the 1.17.0 milestone May 3, 2021
@schalkms
schalkms merged commit 9dd0c8b into detekt:main May 4, 2021
picklebento pushed a commit to picklebento/detekt that referenced this pull request May 13, 2021
…tekt#3733)

Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
@marschwar
marschwar deleted the rule-collector-multiline branch May 24, 2021 12:45
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.

3 participants