Skip to content

Frontovichok/src-comments-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Инструмент для поиска комментариев в исходных текстах

Выполняет поиск комментариев в директории с исходными текстами, используя регулярные выражения. Поиск выполняется по расширениям файлов.

Поддерживает следующие языки:

  • Go
  • C
  • C++
  • C#
  • JavaScript
  • TypeScript
  • Python
  • Perl
  • Java
  • Rust

Запуск:

python comments-parser.py <src_dir> <output.json>

Вывод (output.json):

{
  "directory": "src_dir_pathr",
  "analyzeTime": "yyyy-mm-dd hh:mm:ss",
  "statistics": {
    "totalFiles": 8596,
    "processedFiles": 8596,
    "totalComments": 425829
  },
  "files": {
    "src_dir_path/example.js": [
      {
        "comment": "comment 1",
        "line": 1
      },
      {
        "comment": "comment 2",
        "line": 16
      }
    ],
    "src_dir_path/test.py": [
      {
        "comment": "comment 1",
        "line": 10
      },
      {
        "comment": "comment 2",
        "line": 160
      }
    ]
  }
}

About

The tool for finding comments in the source code using regular expressions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages