Skip to content
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

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

Merged
merged 1 commit into from
May 4, 2021

Conversation

marschwar
Copy link
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
Copy link

codecov bot commented May 2, 2021

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
chao2zhang pushed a commit to chao2zhang/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