{"id":15018733,"url":"https://github.com/marketsquare/robotframework-robocop","last_synced_at":"2025-04-13T23:50:29.659Z","repository":{"id":37812625,"uuid":"278043371","full_name":"MarketSquare/robotframework-robocop","owner":"MarketSquare","description":"Tool for static code analysis and formatting of Robot Framework language","archived":false,"fork":false,"pushed_at":"2025-04-06T16:09:46.000Z","size":3570,"stargazers_count":211,"open_issues_count":43,"forks_count":38,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-06T21:08:16.236Z","etag":null,"topics":["linter","python","robocop","robotframework","testing"],"latest_commit_sha":null,"homepage":"https://robocop.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarketSquare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2020-07-08T09:12:36.000Z","updated_at":"2025-04-06T15:28:34.000Z","dependencies_parsed_at":"2023-12-25T20:02:35.644Z","dependency_job_id":"66497b99-f077-4aa8-a629-467e7cfd9def","html_url":"https://github.com/MarketSquare/robotframework-robocop","commit_stats":{"total_commits":801,"total_committers":21,"mean_commits":"38.142857142857146","dds":"0.28464419475655434","last_synced_commit":"aa82a0bab0d14efa0b2356018bc0a9ed38f3c4c5"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-robocop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-robocop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-robocop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-robocop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarketSquare","download_url":"https://codeload.github.com/MarketSquare/robotframework-robocop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799905,"owners_count":21163400,"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":["linter","python","robocop","robotframework","testing"],"created_at":"2024-09-24T19:52:23.041Z","updated_at":"2025-04-13T23:50:29.617Z","avatar_url":"https://github.com/MarketSquare.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Unit tests](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/tests.yml/badge.svg)](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/unit-tests.yml \"GitHub Workflow Unit Tests Status\")\n![Codecov](https://img.shields.io/codecov/c/github/MarketSquare/robotframework-robocop/master \"Code coverage on master branch\")\n![PyPI](https://img.shields.io/pypi/v/robotframework-robocop?label=version \"PyPI package version\")\n![Python versions](https://img.shields.io/pypi/pyversions/robotframework-robocop \"Supported Python versions\")\n![License](https://img.shields.io/pypi/l/robotframework-robocop \"PyPI - License\")\n[![Downloads](https://static.pepy.tech/personalized-badge/robotframework-robocop?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=downloads)](https://pepy.tech/project/robotframework-robocop)\n\n---\n\n\u003cimg style=\"float:right\" src=\"https://raw.githubusercontent.com/MarketSquare/robotframework-robocop/main/docs/source/images/robocop_logo_small.png\"\u003e\n\nRobocop\n===============\n\n- [Introduction](#introduction)\n- [Documentation](#documentation)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Example Output](#example-output)\n- [Values](#values)\n- [Fixing issues](#fixing-issues)\n- [FAQ](#faq)\n\n---\n\nIntroduction\n------------\n\nRobocop is a tool that performs static code analysis and formatting of [Robot Framework](https://github.com/robotframework/robotframework) code.\n\nIt uses official [Robot Framework parsing API](https://robot-framework.readthedocs.io/en/stable/) to parse files and runs number of checks,\nlooking for potential errors or violations to code quality standards (commonly referred as *linting issues*).\n\n\u003e Hosted on [GitHub](https://github.com/MarketSquare/robotframework-robocop).\n\nDocumentation\n-------------\n\nFull documentation is available [here](https://robocop.readthedocs.io). :open_book:\n\nMost common questions with answers can be found at the bottom ⬇ of this README file.\n\nRequirements\n------------\n\nPython 3.9+ :snake: and Robot Framework 4.0+ :robot:.\n\nInstallation\n------------\n\nYou can install the latest version of Robocop simply by running:\n\n```\npip install -U robotframework-robocop\n```\n\n\nUsage\n-----\n\nRobocop runs by default from the current directory, and it discovers supported files recursively.\nTo lint the files you can run:\n\n```\nrobocop check\n```\n\nTo format the files you can run:\n\n```commandline\nrobocop format\n```\n\nAll command line options can be displayed in help message by executing:\n\n```\nrobocop -h\n```\n\nExample Output\n--------------\n\nExecuting command:\n\n```\nrobocop check --report rules_by_error_type test.robot\n```\n\n\nWill result in the following output:\n\n```text\ntest.robot:17:1 SPC22 Not enough whitespace after 'Test Teardown' setting\n    |\n 15 |\n 16 | Test Setup Keyword\n 17 | Test Teardown Keyword2\n    | ^ SPC22\n 18 | Testtimeout 1min\n 19 | Documentation this is doc\n    |\n\ntest.robot:28:1 SPC14 Variable in Variables section is not left aligned\n   |\n 1 | *** Variables ***\n 2 | ${VAR} 1\n 3 |  ${VAR}  1\n   | ^ SPC14\n 4 |   ${VAR}  1\n 5 | VALUE  1\n\nFound 2 issues: 2 ERRORs, 0 WARNINGs, 0 INFO.\n```\n\nValues\n-------\nOriginal *RoboCop* - a fictional cybernetic police officer :policeman: - was following 3 prime directives\nwhich also drive the progress of Robocop linter:\n\n\u003e First Directive: **Serve the public trust** :family_man_woman_girl_boy:\n\nWhich lies behind the creation of the project - to **serve** developers and testers as a tool to build applications they can **trust**.\n\n\u003e Second Directive: **Protect the innocent** :baby:\n\n**The innocent** testers and developers have no intention to produce ugly code but sometimes, you know, it just happens,\nso Robocop is there to **protect** them.\n\n\u003e Third Directive: **Uphold the law** :classical_building:\n\nFollowing the coding guidelines established in the project are something very important to keep the code clean,\nreadable and understandable by others and Robocop can help to **uphold the law**.\n\nFAQ\n---\n\u003cdetails\u003e\n  \u003csummary\u003eCan I integrate Robocop with my code editor (IDE)?\u003c/summary\u003e\n\n  **Yes**, Robocop integrates nicely with popular IDEs like PyCharm or VSCode\n  thanks to [RobotCode](https://github.com/robotcodedev/robotcode) plugin.\n  Read simple manual (README) in that project to figure out how to install \u0026 use it.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan I load configuration from file?\u003c/summary\u003e\n\n  **Yes**, you can use toml-based configuration files:\n\n  **`pyproject.toml` file**\n  **`robocop.toml` file**\n  **`robot.toml` file**\n\n  Example configuration file:\n\n  ```toml\n  [tool.robocop]\n  exclude = [\"deprecated.robot\"]\n  \n  [tool.robocop.lint]\n  select = [\n    \"rulename\",\n    \"ruleid\"\n  ]\n  configure = [\n      \"line-too-long.line_length=110\"\n  ]\n  \n  [tool.robocop.format]\n  select = [\"NormalizeNewLines\"]\n  configure = [\n      \"NormalizeNewLines.flatten_lines=True\"\n  ]\n  ```\n\n  Multiple configuration files are supported. However, global-like options such as ``--verbose`` or ``--reports`` are\n  only loaded from top configuration file. Read more in\n  [configuration](https://robocop.readthedocs.io/en/stable/configuration/configuration.html).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eI use different coding standards. Can I configure rules so that they fit my needs?\u003c/summary\u003e\n\n  **Yes**, some rules and formatters are configurable. You can find the configuration details in the documentation or\n  by running:\n\n  ```commandline\n  robocop docs rule_name_or_id\n  robocop docs formatter_name\n  ```\n\n  Configuring is done by using `-c / --configure` command line option followed by pattern\n  `\u003cname\u003e.\u003cparam_name\u003e=\u003cvalue\u003e` where:\n  - `\u003cname\u003e` can either be rule name or its id, or formatter name\n  - `\u003cparam_name\u003e` is a public name of the parameter\n  - `\u003cvalue\u003e` is a desired value of the parameter\n\n  For example:\n\n  ```\n  robocop check --configure line-too-long.line_length=140\n  ```\n\n  ---\n  Each rule's severity can also be overwritten. Possible values are\n  `e/error`, `w/warning` or `i/info` and are case-insensitive. Example:\n\n  ```\n  robocop check -c too-long-test-case.severity=e\n  ```\n\n  ---\n  If there are special cases in your code that violate the rules,\n  you can also exclude them in the source code.\n\n  Example:\n\n  ```\n  Keyword with lowercased name  # robocop: off\n  ```\n\n  More about it in\n  [our documentation](https://robocop.readthedocs.io/en/stable/rules/rules_basics.html#selecting-and-ignoring-rules).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan I define custom rules?\u003c/summary\u003e\n\n  **Yes**, you can define and include custom rules using `--custom-rules` command line option\n  by providing a path to a file containing your rule(s):\n  ```\n  robocop --custom-rules my/own/rule.py --custom-rules rules.py,external_rules.py\n  ```\n\n  If you feel that your rule is very helpful and should be included in Robocop permanently,\n  you can always share your solution by\n  [submitting a pull request](https://github.com/MarketSquare/robotframework-robocop/pulls).\n  You can also share your idea by\n  [creating an issue](https://github.com/MarketSquare/robotframework-robocop/issues/new/choose).\n\n  More about custom rules with code examples in\n  [our documentation](https://robocop.readthedocs.io/en/stable/rules/external_rules.html).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan I use Robocop in continuous integration (CI) tools?\u003c/summary\u003e\n\n  **Yes**, Robocop is able to produce different kinds of reports that are supported by most popular platforms such as\n  GitHub, Gitlab, Sonar Qube etc. Read more in [reports](https://robocop.readthedocs.io/en/stable/integrations.html).\n\n\u003c/details\u003e\n\n----\n\n\u003e Excuse me, I have to go. Somewhere there is a crime happening. - Robocop\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketsquare%2Frobotframework-robocop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarketsquare%2Frobotframework-robocop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketsquare%2Frobotframework-robocop/lists"}