Skip to content

Lines of Code Badge

Actions
Generate a badge to display total Lines of Code
1.0.0
Latest
Star (37)

LoC-Badge Generated Button

Count project Lines of Code & generate a badge for display.

To use:

In a Github Action, download your project and run this action:

      - name: Make Code Badge
        uses: shadowmoose/[email protected]
        id: badge
        with:
          debug: true
          directory: ./
          badge: ./output/badge.svg
          patterns: '*.js'  # Patterns in the format of a '.gitignore' file, separated by pipes.
          ignore: 'node_modules'

Once the badge has been generated, use whatever tool you prefer to upload it somewhere. I personally prefer to push the badges to another branch of the project, where they can be linked easily.

You can see a full example file that does this here.

The output badge can be customized. Check out the input options here.

Lines of Code Badge is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generate a badge to display total Lines of Code
1.0.0
Latest

Lines of Code Badge is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.