Skip to content

Instantly share code, notes, and snippets.

@Calinou
Created Feb 20, 2021
Embed
What would you like to do?
Configuration for running git-code-debt on the Godot repository
  1. Install Python 3.6 or later and pip then run pip install --user --upgrade git-code-debt.
  2. Save generate_config.yaml and metric_config.yaml in the same folder.
  3. Run git-code-debt-generate. This will take a few minutes.
  4. Run git-code-debt-server database.db and open the address that appears in the console output in a web browser.

See https://github.com/asottile/git-code-debt for more information.

# required: repository to clone (can be anything `git clone` understands) even
# a repository already on disk
repo: /absolute/path/to/godot/git/clone
# required: database generation path
database: database.db
# optional: default False
skip_default_metrics: false
# optional: default []
metric_package_names: []
# optional: default ^$ (python regex) to exclude paths such as '^vendor/'
exclude: |
(?x)^(
thirdparty/.*| # Third-party files
doc/classes/.*.xml| # Core class reference
modules/.*/doc_classes/*.xml| # Module class reference
.*\.po| # Translations
.*\.pot # Translation templates
)$
# This is a sample metric config
# Sample Groups definition:
# Groups:
# Group1:
# metrics:
# - FooMetric
# - BarMetric
# metric_expressions:
# - ^.*Baz.*$
#
# This defines a group named Group1 which explicitly includes the metrics
# FooMetric and BarMetric and also includes all metrics which match ^.*Baz.*$.
# NOTE: metrics and metric_expressions may be omitted
Groups:
- Python:
metric_expressions:
- (?i)^.*Python.*$
- CurseWords:
metric_expressions:
- ^TotalCurseWords.*$
- LinesOfCode:
metric_expressions:
- ^TotalLinesOfCode.*$
# Sample ColorOverrides definition:
# ColorOverrides:
# - PartialTemplateCount
#
# This indicates that PartialTemplateCount should be colored the opposite of
# the usual coloring (the usual coloring is up = red, down = green).
ColorOverrides: []
# Sample CommitLinks for Commit page:
# CommitLinks:
# View on Github: https://github.com/asottile/git-code-debt/commit/{sha}
# ...
#
# These links will have the following variables substituted when displayed:
# {sha} - Points to the full (40-character) sha of the commit
CommitLinks:
View on Github: https://github.com/godotengine/godot/commit/{sha}
# These denote the metrics to show in the widget.
# (Currently the values are intentionally empty maps)
WidgetMetrics:
TotalLinesOfCode: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment