sloccountなどのツールが解凍せずに.debパッケージを処理できますか?

sloccountなどのツールが解凍せずに.debパッケージを処理できますか?

AFAIK debパッケージはarアーカイブです。

┌─[shirish@debian] - [~/games/example] - [10297]
└─[$] ls

libcpuid14_0.4.0_amd64.deb

┌─[shirish@debian] - [~/games/example] - [10298]
└─[$] ar x

libcpuid14_0.4.0_amd64.deb

┌─[shirish@debian] - [~/games/example] - [10299]
└─[$] ls

control.tar.gz  data.tar.xz  debian-binary  libcpuid14_0.4.0_amd64.deb

これで、物理的なソースコード行(SLOC)を計算して商品化するときに生成する必要があるコードの量を定量化するために使用されるsloccountがあります。

プロジェクト写真——

SLOC    Directory   SLOC-by-Language (Sorted)
23697   src_modes       cpp=23697
12608   src_engine      cpp=12608
9584    src_luabind     cpp=9584
7269    src_common      cpp=7269
5294    src_editor      cpp=5294
3162    game            sh=3162
1721    src_top_dir     cpp=1598,objc=123
1425    top_dir         sh=1425
41      txt             sh=25,sed=16
0       HoA.xcodeproj   (none)
0       autom4te.cache  (none)
0       doc             (none)
0       img             (none)
0       lib             (none)
0       lua             (none)
0       m4              (none)
0       mus             (none)
0       snd             (none)


Totals grouped by language (dominant language first):
cpp:          60050 (92.67%)
sh:            4612 (7.12%)
objc:           123 (0.19%)
sed:             16 (0.02%)




Total Physical Source Lines of Code (SLOC)                = 64,801
Development Effort Estimate, Person-Years (Person-Months) = 15.97 (191.59)
 (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months)                         = 1.53 (18.42)
 (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule)  = 10.40
Total Estimated Cost to Develop                           = $ 2,156,763
 (average salary = $56,286/year, overhead = 2.40).
SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL.
SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to
redistribute it under certain conditions as specified by the GNU GPL license;
see the documentation for details.
Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."

メモリから解凍したり、解凍したりせずに上記のように出力を提供せずにdebパッケージを読み取ることができるsloccountのようなツールはありますか?

ベストアンサー1

クローク?リポジトリで利用可能です。

与えられたファイル内のソースコードの実際の行数を計算します(圧縮されたtarballやzipファイルなどです。)および/または特定のディレクトリ内で再帰的に実行されます。

「clocには私の好きな機能がいくつかあります。まず、clocは圧縮ファイルを直接処理できます。clocはこれを行う前にアーカイブを抽出する必要はありません。clocは自動的に解凍を処理します。問題が発生した場合は、生物学的利点を主張することができます。 ---https://inconsolation.wordpress.com/2014/07/29/cloc-clock-your-code/

おすすめ記事