{"id":50419006,"url":"https://github.com/michael-borck/code-analyser","last_synced_at":"2026-05-31T07:30:49.525Z","repository":{"id":312794202,"uuid":"1048150925","full_name":"michael-borck/code-analyser","owner":"michael-borck","description":"Analyzes and grades student code submissions with plagiarism detection and sandboxed execution.","archived":false,"fork":false,"pushed_at":"2026-05-23T04:47:41.000Z","size":418,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T06:20:03.283Z","etag":null,"topics":["automated-grading","borck-edu","code-analysis","code-quality","docker","edtech","education","fastapi","microservice","plagiarism-detection","python","static-analysis"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/michael-borck.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T02:26:05.000Z","updated_at":"2026-05-23T04:47:45.000Z","dependencies_parsed_at":"2025-09-02T04:09:10.866Z","dependency_job_id":"38becfc4-5bad-41ce-b1c0-a6ceee329839","html_url":"https://github.com/michael-borck/code-analyser","commit_stats":null,"previous_names":["michael-borck/code-lens","michaelborck-education/code-lens","michael-borck/code-analyser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michael-borck/code-analyser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-borck%2Fcode-analyser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-borck%2Fcode-analyser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-borck%2Fcode-analyser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-borck%2Fcode-analyser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael-borck","download_url":"https://codeload.github.com/michael-borck/code-analyser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-borck%2Fcode-analyser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33723548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automated-grading","borck-edu","code-analysis","code-quality","docker","edtech","education","fastapi","microservice","plagiarism-detection","python","static-analysis"],"created_at":"2026-05-31T07:30:48.575Z","updated_at":"2026-05-31T07:30:49.521Z","avatar_url":"https://github.com/michael-borck.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-analyser\n\nAnalyses source code files and returns style violations, complexity metrics, and quality indicators. Designed as a low-level tool — feed it a file, get back structured JSON.\n\nPart of the [analyser family](https://github.com/michael-borck/lens-analysers).\n\n\u003e **Status**: Early development. Currently supports Python via ruff and basic AST metrics. Multi-language support and alignment with the family API pattern is in progress.\n\n## Install\n\n```bash\npip install code-analyser\n```\n\nRequires Python 3.11+.\n\n## Usage\n\n### Python\n\n```python\nfrom code_analyser import analyse\n\nresult = analyse(\"submission.py\")\n\nprint(f\"Lines:      {result['metrics']['lines_of_code']}\")\nprint(f\"Complexity: {result['metrics']['cyclomatic_complexity']}\")\nprint(f\"Issues:     {len(result['issues'])}\")\n```\n\n### HTTP API\n\n```bash\n# Start the server\nuvicorn code_analyser.main:app --port 8004\n\ncurl -X POST http://localhost:8004/api/v1/analyze/python \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"code\": \"def hello():\\n    print(\\\"Hello\\\")\", \"language\": \"python\"}'\n```\n\n## Supported languages\n\n| Language | Status |\n|---|---|\n| Python | supported (ruff, AST metrics) |\n| JavaScript, Java, others | planned |\n\n## Output\n\n```json\n{\n  \"language\": \"python\",\n  \"metrics\": {\n    \"lines_of_code\": 42,\n    \"cyclomatic_complexity\": 3,\n    \"maintainability_index\": 74.2\n  },\n  \"issues\": [\n    {\"rule\": \"E501\", \"line\": 12, \"message\": \"line too long (92 \u003e 88 characters)\"}\n  ],\n  \"summary\": {\n    \"error_count\": 0,\n    \"warning_count\": 1,\n    \"style_count\": 2\n  }\n}\n```\n\n## The analyser family\n\nLow-level analysis tools. Each accepts files directly and returns structured JSON. Build your own UI or pipeline on top.\n\n| Package | Handles |\n|---|---|\n| [speech-analyser](https://github.com/michael-borck/speech-analyser) | audio and video files — transcript and speech metrics |\n| [video-analyser](https://github.com/michael-borck/video-analyser) | video files — frames, scenes, and visual quality |\n| [document-analyser](https://github.com/michael-borck/document-analyser) | PDF, DOCX, PPTX, TXT — text and readability |\n| [code-analyser](https://github.com/michael-borck/code-analyser) | source code — style, complexity, and quality metrics |\n| [records-analyser](https://github.com/michael-borck/records-analyser) | CSV, Excel, SQLite, Parquet, JSON — data profiling |\n| [auto-analyser](https://github.com/michael-borck/auto-analyser) | any file — detects format and routes to the right tool |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-borck%2Fcode-analyser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael-borck%2Fcode-analyser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-borck%2Fcode-analyser/lists"}