{"id":20273597,"url":"https://github.com/astropilot/jane_c","last_synced_at":"2026-06-06T12:31:25.872Z","repository":{"id":91469942,"uuid":"154634731","full_name":"Astropilot/jane_c","owner":"Astropilot","description":"An ETNA C standard correction program","archived":false,"fork":false,"pushed_at":"2024-08-14T16:33:44.000Z","size":790,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T00:42:36.053Z","etag":null,"topics":["etna","moulinette","python","srcml"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astropilot.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":"2018-10-25T08:17:58.000Z","updated_at":"2019-04-25T10:57:26.000Z","dependencies_parsed_at":"2023-07-17T03:15:16.411Z","dependency_job_id":null,"html_url":"https://github.com/Astropilot/jane_c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Astropilot/jane_c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astropilot%2Fjane_c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astropilot%2Fjane_c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astropilot%2Fjane_c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astropilot%2Fjane_c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astropilot","download_url":"https://codeload.github.com/Astropilot/jane_c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astropilot%2Fjane_c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33983046,"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-06-06T02:00:07.033Z","response_time":107,"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":["etna","moulinette","python","srcml"],"created_at":"2024-11-14T12:49:33.745Z","updated_at":"2026-06-06T12:31:25.850Z","avatar_url":"https://github.com/Astropilot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Jane for C\n\nJane is an ETNA standards fault detection program for projects written in C.\nIt was written in Python 2.7 for Windows and bases its code analysis on the srcml framework.\n\nThis program will check each of the standards defined by ETNA and indicate the problems found with as much precision as possible. You can find the official\nETNA Coding Style in pdf format [here](C_Coding_Style.pdf).\n\nBe aware that this program is developed by a student and that the verifications are based on the \"C Coding Style\" and may differ from the official verification program used by ETNA.\n\nYou are invited to participate in the implementation and correction of the verification rules! For that look at the category \"Contributing\".\n\n## How to use it\n\n### Prerequisites\n\nIn order to make Jane work, you will need:\n* [Python 2.X](https://www.python.org/downloads/) (X \u003e= 7)\n* [lxml library for Python](https://lxml.de/)\n* [srcML Framework](https://www.srcml.org/#download)\n\n/!\\ Do not forget to add srcML in `PATH` env !\n\n### Installation\n\nJust make a copy of the git repository and go to the `src` folder.\n\n```bash\n$\u003e git clone https://github.com/Astropilot/jane_c.git\n$\u003e cd src/\n```\n\nYou can now simply launch the main script with the path to your C project as an argument.\n\n```bash\n$\u003e python jane_c.py C:\\Projects\\ExampleProject\n```\n\n### Rules implemented\n\nThe following is a list of the standards that have been implemented and their implementation details:\n\n| Rule   | Implemented                 | Details              |\n|--------|:---------------------------:|----------------------|\n| O1     | :heavy_check_mark:          | Fully Implemented    |\n| O2     | :x:                         | Can't be implemented |\n| O3     | :heavy_check_mark:          | Fully Implemented    |\n| O4     | :heavy_check_mark: :heavy_exclamation_mark:    | Just checking `snake_case` convention    |\n| G1     | :heavy_check_mark:          | Fully Implemented    |\n| G2     | :heavy_check_mark:          | Fully Implemented    |\n| G3     | :x:                         | Can't be implemented |\n| G4     | :x:                         | Not implemented      |\n| F1     | :x:                         | Not implemented      |\n| F2     | :heavy_check_mark: :heavy_exclamation_mark:        | Just checking `snake_case` convention    |\n| F3     | :heavy_check_mark:          | Fully Implemented    |\n| F4     | :heavy_check_mark:          | Fully Implemented    |\n| F5     | :heavy_check_mark: :heavy_exclamation_mark:        | Not checking if structures are transmitted as parameters using a pointer    |\n| F6     | :heavy_check_mark:          | Fully Implemented    |\n| L1     | :heavy_check_mark:          | Fully Implemented    |\n| L2     | :heavy_check_mark:          | Fully Implemented    |\n| L3     | :x:                         | Partially implemented      |\n| L4     | :heavy_check_mark:          | Fully Implemented    |\n| L5     | :heavy_check_mark:          | Fully Implemented    |\n| L6     | :heavy_check_mark:          | Fully Implemented    |\n| V1     | :heavy_check_mark:          | Fully Implemented    |\n| V2     | :x:                         | Not implemented      |\n| V3     | :heavy_check_mark: :heavy_exclamation_mark:                         | Not all pointer can be checked (need fix)      |\n| C1     | :heavy_check_mark:          | Fully Implemented    |\n| C2     | :heavy_check_mark:          | Fully Implemented    |\n| A1     | :x:                         | Can't be implemented |\n| A2     | :x:                         | Can't be implemented |\n| H1     | :x:                         | Not implemented      |\n| H2     | :heavy_check_mark:          | Fully Implemented    |\n| H3     | :heavy_check_mark:          | Fully Implemented    |\n\n## Contributing\n\nEach rule is defined in a separate file, which you can find in the `c_rules` folder.\nI invite you to look at the existing rules in order to understand how to use the different tools available.\n\nHowever, a minimal structure is required for your rule to be functional:\n\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nJane for C Projects\nAuthor: YOUR_NAME (https://github.com/Astropilot/jane_c)\n\nRULE_NAME Rule: RULE_SHORT_DESCRIPTION\n\"\"\"\n\nfrom etna_style_utils import *\nfrom srcml import *\n\nclass RuleChecker:\n\n    def __init__(self, project):\n        self.project = project\n\n    def check_rule(self):\n        project = self.project\n        # From here, you are free to write your code\n```\n________\n\nThe `project` variable allows you to access the list of files contained in the project given as an argument. You can request only certain files, or exclude some.\n```python\nfiles = []\nfiles.extend(project.get_files_from_project(project.FILE_TYPES[\"ALL\"], exclude = False))\n```\n\nHere is a list of the already defined types of files you can use:\n\n```python\nproject.FILE_TYPES[\"ALL\"] = []\nproject.FILE_TYPES[\"C_FILES\"] = [\".c\", \".h\"]\nproject.FILE_TYPES[\"C_SOURCES\"] = [\".c\"]\nproject.FILE_TYPES[\"C_HEADERS\"] = [\".h\"]\n```\n\nBut of course you can customize the desired file types:\n```python\nfiles = []\nfiles.extend(project.get_files_from_project([\".txt\", \".ext\"]))\n```\n\n________\n\nThanks to the srcML framework you can obtain the source code of a file in XML format, which allows you to use XPath for example to move around and quickly check the tags.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastropilot%2Fjane_c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastropilot%2Fjane_c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastropilot%2Fjane_c/lists"}