Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detekt Configuration Schema 1.22.0 (#2623)
* Backup old configs * 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. * Add old config with new name * Run generated-detekt-config.json through https://www.liquid-technologies.com/online-json-to-schema-converter Options: array rules = allow anything, make required = false * Replace `"items": {}` with `"items": { "type": "string" }` and format. * Update ForbiddenImport.imports and ForbiddenMethodCall.methods schemas to mimic valuesWithReason() * Update build.weights to accept numeric weights with any key. * Add common rule properties based on https://json-schema.org/understanding-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.) * Remove excludes and define it centrally. Search (regex, spaces and new line at the end matter): ``` "excludes": \{ "type": "array", "items": \{ "type": "string" } },? ``` Replace: nothing * Minor cleanup to shorten schema ,\s*"properties": \{\s*} -> nothing * Fix YAML to JSON conversion weirdness * Rename files to match store conventions. Inferred original detekt schema and example to be 1.14.1 based on date and contents. * Fix ajv strict validation errors in detekt schemas * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information