{"id":25541063,"url":"https://github.com/rustydaemon/source-code-scanner","last_synced_at":"2025-07-31T23:11:20.716Z","repository":{"id":244455009,"uuid":"815290201","full_name":"RustyDaemon/source-code-scanner","owner":"RustyDaemon","description":"Scans your project folder and provides a helpful summary: total files number, total lines of code, median, average and other metrics","archived":false,"fork":false,"pushed_at":"2024-07-26T18:48:27.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T11:30:46.758Z","etag":null,"topics":["code-scanner","code-vitals","rust","stats"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RustyDaemon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T19:23:24.000Z","updated_at":"2024-07-26T18:48:30.000Z","dependencies_parsed_at":"2024-11-23T01:00:28.760Z","dependency_job_id":null,"html_url":"https://github.com/RustyDaemon/source-code-scanner","commit_stats":null,"previous_names":["rustamirzaev/source-code-scanner","rustydaemon/source-code-scanner"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyDaemon%2Fsource-code-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyDaemon%2Fsource-code-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyDaemon%2Fsource-code-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyDaemon%2Fsource-code-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RustyDaemon","download_url":"https://codeload.github.com/RustyDaemon/source-code-scanner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239790338,"owners_count":19697543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-scanner","code-vitals","rust","stats"],"created_at":"2025-02-20T06:28:57.717Z","updated_at":"2025-02-20T06:28:58.748Z","avatar_url":"https://github.com/RustyDaemon.png","language":"Rust","readme":"# Source Code Scanner\n\n## Features\n\n- ☑️ Scan a project folder\n- ☑️ Search for files with a specific extension(s)\n- ☑️ Count the total number of files by extension\n- ☑️ Count the total sum of lines of code (ignoring empty lines)\n- ☑️ Calculate the average, median, and standard deviation of the lines of code\n- ☑️ Ignore specified folder(s)\n- ☑️ Generate a tiny markdown report\n- ☑️ Colorized output\n- ☑️ Written in Rust\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"842\" alt=\"Screenshot\" src=\"https://github.com/RustamIrzaev/source-code-scanner/assets/352703/685ba6e5-51b2-46aa-8647-17e8294b4f7c\"\u003e\n\u003c/p\u003e\n\n## Usage\n\n### Prerequisites\n\n- Rust. Ensure that Rust is installed on your system. You can install Rust from [rust-lang.org](https://rust-lang.org).\n\n### Building the project\n\nClone the repository and build the project:\n\n```bash\ngit clone https://github.com/RustamIrzaev/source-code-scanner.git\ncd source-code-scanner\ncargo build --release # builds the project\n\ncd target/release # switch to where the executable is placed\n./source-code-scanner -f \u003cFOLDER\u003e -e \u003cEXT\u003e # run! (see options below)\n```\n\n### Run the application\n\nSimple run:\n`./source-code-scanner -f \u003cfolder_path\u003e -e \u003cfile_extension\u003e`\n\nWith ignored folders:\n`./source-code-scanner -f \u003cfolder_path\u003e -e \u003cfile_extension\u003e -i \u003cfolder1\u003e,\u003cfolder2\u003e`\n\nWith hardcoded ignored folders:\n`./source-code-scanner -f \u003cfolder_path\u003e -e \u003cfile_extension\u003e --hce`\n\nReal example (with report generation and an extended statistics):\n`./source-code-scanner -f /home/user/projects/my_project -e rs -i target,.git -r -s`\n\n## Parameters\n\n### General\n\n- `-f`/`--folder`\n  - the path to a project folder\n  - usage `-f \u003cfolder\u003e`\n- `-e`/`--extensions`\n  - the file extension of the files to be scanned (comma separated)\n  - usage `-e \u003cextension1\u003e,\u003cextension2\u003e`\n- `-i`/`--ignore`\n  - the list of folders to be ignored, comma separated\n  - usage `-i \u003cfolder1\u003e,\u003cfolder2\u003e,\u003cfolder3\u003e`\n- `-r`/`--report`: generate a small markdown report (\\*.md extension)\n- `-s`/`--stats`: show additional summary statistics (average, median, std deviation)\n\n### Misc\n\n- `--hce`: use hardcoded list of ignored folders _(see below)_. Please note that `-i` parameter has higher priority than this one\n- `--max-depth`\n  - the maximum depth of the folder scanning _(default: 10)_\n  - usage `--max-depth \u003cdepth\u003e`\n- `-V`/`--version`: prints the version of the program\n- `-h`/`--help`: prints the help message\n\n## Report\n\nThe report is generated in the project folder with the name `report_scs.md`.\nThe demo report is available [here](demo_report.md).\n\n## Ignored folders\n\nAt this moment, the list of ignored folders are hardcoded:\n`.idea`, `.git`, `node_modules`, `obj`, `bin`, `build`, `out`, `dist`.\n\nHowever, you can change this directly from the code - see `hardcoded.rs` file for a `EXCLUDE_FOLDERS_EMBEDDED` slice.\n\n## License\n\nThe source code is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustydaemon%2Fsource-code-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustydaemon%2Fsource-code-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustydaemon%2Fsource-code-scanner/lists"}