Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

GitHub Action to Count Lines of Code withhttps://github.com/AlDanial/cloc

License

NotificationsYou must be signed in to change notification settings

djdefi/cloc-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action to Count Lines of Code withhttps://github.com/AlDanial/cloc

Example workflow:

name:Count Lines of Code# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the main branchon:push:branches:[ main ]pull_request:branches:[ main ]# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs:# This workflow contains a single job called "build"cloc:# The type of runner that the job will run onruns-on:ubuntu-latest# Steps represent a sequence of tasks that will be executed as part of the jobsteps:# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it    -uses:actions/checkout@v3# Runs djdefi/cloc-action    -name:Count Lines of Code (cloc)uses:djdefi/cloc-action@6

Additional Options

Thecloc-action allows you to provide additional options to customize your usage. These can be passed during the step execution in your workflow file. The options are passed to the underlyingcloc tool.

Here is an example of how to provide additional options:

-name:Count Lines of Code with additional optionsuses:djdefi/cloc-action@mainwith:options:--exclude-lang=YAML --md --report-file=cloc.md

In the example above:

--exclude-lang=YAML is used to exclude YAML files from the count.--md is used to generate the output in markdown format.--report-file=cloc.md is used to write the output to thecloc.md file.

These are just a few examples, other options are available based on your needs, some of which you can find in thecloc documentation.

Note: Please provide the options without any quotes. Any options requiring quotes should be escaped inside a string. For example,options: "--exclude-dir=path\ to\ folder"

This level of customization lets you control howcloc works based on the specific needs of your project.


[8]ページ先頭

©2009-2025 Movatter.jp