← All recipes
Open source

Language composition report

Recipe IDorg.openrewrite.LanguageComposition
Artifactorg.openrewrite.recipe:rewrite-all

Counts the number of lines of the various kinds of source code and data formats parsed by OpenRewrite. Comments are not included in line counts. This recipe emits its results as two data tables, making no changes to any source file. One data table is per-file, the other is per-repository.

Single recipeApache 2.0

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.LanguageComposition

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite.recipe:rewrite-all:1.28.0

Data tables

Structured output this recipe can produce.

  • Language composition reportCounts the number of files and lines of source code in the various formats OpenRewrite knows how to parse.org.openrewrite.table.LanguageCompositionPerRepository
  • Per-folder language composition reportA list of folders and the language composition and line counts of their contents.org.openrewrite.table.LanguageCompositionPerFolder
  • Per-file language composition reportA list of individual files and their language composition.org.openrewrite.table.LanguageCompositionPerFile
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats