Skip to main content

XML style Auto-detection debug

org.openrewrite.xml.style.AutodetectDebug

Runs XML Autodetect and records the results in data tables and search markers. A debugging tool for figuring out why XML documents get styled the way they do.

Recipe source

GitHub, Issue Tracker, Maven Central

This recipe is available under the Apache License Version 2.0.

Usage

This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies.

  1. Add the following to your build.gradle file:
build.gradle
plugins {
id("org.openrewrite.rewrite") version("7.6.1")
}

rewrite {
activeRecipe("org.openrewrite.xml.style.AutodetectDebug")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

  1. Run gradle rewriteRun to run the recipe.

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

XML style report

org.openrewrite.xml.table.XmlStyleReport

Records style information about XML documents. Used for debugging style auto-detection issues.

Column NameDescription
File nameThe name of the file that was analyzed.
Use tabsWhen 'true', tabs are used for indentation. When 'false', spaces are used.
Indent sizeThe number of spaces that are used for each level of indentation.
Tab sizeThe number of spaces that a tab character represents.
Continuation indent sizeThe number of spaces that are used to indent an attribute that is on its own line.
Indent countCount of tags in the file whose prefixes were evaluated.
Indents matching own styleCount of tags in the file whose prefix match the style of the file itself.
Indents matching project styleCount of tags in the file whose prefix match the overall style of the project.
Continuation indent countCount of attributes in the file whose prefixes were evaluated.
Continuation indents matching own styleCCount of attributes in the file whose prefix matches the style of the file itself.
Continuation indents matching project styleCount of attributes in the file whose prefix matches the overall style of the project.