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

Detekt Configuration Schema 1.22.0 #2623

Merged
merged 14 commits into from
Nov 30, 2022

Commits on Nov 30, 2022

  1. Backup old configs

    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    7c67541 View commit details
    Browse the repository at this point in the history
  2. Add new test configs by converting

     * detekt\detekt-core\src\main\resources\default-detekt-config.yml
     * gradlew :detektGenerateConfig output on v1.22.0 tag
    via https://onlineyamltools.com/convert-yaml-to-json.
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    7eb5848 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    878d2d6 View commit details
    Browse the repository at this point in the history
  4. Run generated-detekt-config.json

    through https://www.liquid-technologies.com/online-json-to-schema-converter
    Options: array rules = allow anything, make required = false
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    9dc517f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6f12574 View commit details
    Browse the repository at this point in the history
  6. Update ForbiddenImport.imports and ForbiddenMethodCall.methods schema…

    …s to mimic valuesWithReason()
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    d24f23d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d6fb4c9 View commit details
    Browse the repository at this point in the history
  8. Add common rule properties based on https://json-schema.org/understan…

    …ding-json-schema/structuring.html#defs
    
    and https://stackoverflow.com/a/52579526/253468
    
    Search (regex, spaces matter):
    ```
              "properties": \{
                "active": \{
                  "type": "boolean"
                },?
    ```
    Replace (regex):
    ```
              "allOf": [
                {
                  "\$ref": "#/\$defs/ruleProperties"
                }
              ],
              "properties": {
    ```
    
    (I left autoCorrect at the original places, because, while it's valid to define it, it won't have effect other than where it's already shown.)
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    d5a530e View commit details
    Browse the repository at this point in the history
  9. Remove excludes and define it centrally.

    Search (regex, spaces and new line at the end matter):
    ```
                "excludes": \{
                  "type": "array",
                  "items": \{
                    "type": "string"
                  }
                },?
    
    ```
    Replace: nothing
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    c15fd54 View commit details
    Browse the repository at this point in the history
  10. Minor cleanup to shorten schema

    ,\s*"properties": \{\s*}
    ->
    nothing
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    ea4a7c0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6f1154e View commit details
    Browse the repository at this point in the history
  12. Rename files to match store conventions.

    Inferred original detekt schema and example to be 1.14.1 based on date and contents.
    TWiStErRob committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    0fedb79 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7ab9cc7 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8dad9f1 View commit details
    Browse the repository at this point in the history