Babylonische Sprachverwirrung
Ich stolperte über ein Analyseprogramm »cloc«. Es analysiert Programmcode und als Ergebnis wird etwas Statistik ausgeworfen. Das habe ich für das Projekt »Mantis« 1 gemacht und war erschrocken und irritiert, denn die Vielzahl der Sprachen im Projekt hatte ich so nicht vermutet. Es stellt sich die Frage: Was für ein Kuddel-Muddel ist das denn? Wer soll da als Sicherheits-Verantwortlicher noch die Kontrolle behalten?
Hier nun die Ergebnisse Im ersten Versuch das komplette Projekt und im Zweiten, ohne den JavaScript-Kram, also den »node_modules«-Ordner gelöscht.
Eine Dockerinstanz übernimmt die Arbeit...
cd /pfad/zum/projekt
podman run --rm -v $PWD:/tmp aldanial/cloc .
1. Versuch
43 Sprachen und Tools und welche Rolle spielt hier Fortran?
2 errors: Line count, exceeded timeout: ./app/static/node_modules/needle/lib/needle.js Line count, exceeded timeout: ./app/static/node_modules/sass/sass.dart.js github.com/AlDanial/cloc v 1.98 T=154.09 s (113.3 files/s, 37688.2 lines/s) -------------------------------------------------------------------------------- Language files blank comment code -------------------------------------------------------------------------------- JavaScript 7220 157603 465682 2722173 Python 3920 264772 356236 1142267 JSON 3011 24 0 172900 TypeScript 1715 21032 91475 148641 Markdown 671 31124 166 77690 CSV 30 0 0 36702 C/C++ Header 88 3522 4615 19165 CSS 40 3041 619 17490 Text 83 495 0 16634 HTML 87 1396 138 12093 C++ 33 1068 1280 5436 GLSL 136 1588 576 3581 PO File 32 1149 1368 3505 Cython 19 713 536 2955 C 8 174 172 2226 YAML 86 177 74 1803 SQL 6 15 16 1449 Fortran 90 61 132 97 1007 SCSS 20 207 30 954 SVG 33 313 2 926 TOML 2 43 122 713 reStructuredText 16 253 67 596 Mako 9 146 4 557 Fortran 77 24 29 55 400 Bourne Shell 8 62 38 352 Protocol Buffers 23 58 51 306 XML 17 2 0 288 EJS 3 23 0 256 INI 13 49 0 196 DOS Batch 5 22 1 148 Meson 3 24 9 122 Assembly 2 30 14 120 Lua 6 26 7 104 CoffeeScript 7 23 11 92 yacc 1 15 3 92 Fish Shell 1 20 34 70 make 6 31 11 66 Bourne Again Shell 4 10 0 65 Handlebars 1 24 0 51 PowerShell 1 13 23 46 C Shell 1 14 27 35 lex 1 5 0 19 Fortran 95 1 0 1 4 -------------------------------------------------------------------------------- SUM: 17454 489467 923560 4394295 --------------------------------------------------------------------------------
2. Versuch
Den Ordner »node__modules« habe ich gelöscht, mein erhöhter Puls hat sich wieder etwas gesenkt 🙂
podman run --rm -v $PWD:/tmp aldanial/cloc . github.com/AlDanial/cloc v 1.98 T=0.98 s (110.1 files/s, 149419.3 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 42 776 11693 103430 Text 3 12 0 14532 HTML 36 709 125 6981 CSS 2 920 167 3700 JavaScript 8 329 194 1623 SVG 11 312 1 838 JSON 5 0 0 202 XML 1 2 0 52 ------------------------------------------------------------------------------- SUM: 108 3060 12180 131358 -------------------------------------------------------------------------------
Erkenntnis
O-ha?! Wer hätte das gedacht? Wer das Sammelsurium kontrollieren will, muß ne ganze Menge lernen...
Bildquelle:
Martin Luther - Wittenberg-Bibel, Bild-PD-alt, https://de.wikipedia.org/w/index.php?curid=5578504
Fußnoten
- Website: https://gottesanbeterin-gesucht.de/
- Quellcode: https://gitlab.com/opendata-apps/mantis