# RuboCop

> a Ruby static code analyzer (a.k.a. linter) and code formatter

**Wikidata**: [Q108482220](https://www.wikidata.org/wiki/Q108482220)  
**Source**: https://4ort.xyz/entity/rubocop

## Summary
RuboCop is a static code analyzer and code formatter for the Ruby programming language. Often described as a "linter," it checks code for style violations and errors. It is distributed as free software under the Expat license and is widely available across various operating systems and package managers.

## Key Facts
- **Description:** A Ruby static code analyzer (linter) and code formatter.
- **License:** Expat license (a permissive free software license).
- **Category:** Instance of "free software" and "lint" tools.
- **Websites:** Official site is `https://rubocop.org/`; source code is hosted at `https://github.com/rubocop/rubocop`.
- **Package Availability:** Available as `rubocop` on Ubuntu and Debian (stable), `devel/rubygem-rubocop` on FreeBSD, and `ruby-rubocop` on Guix.
- **Release History (2014):** Multiple versions were released in 2014, including v0.19.0 (March 13), v0.20.0 (April 2), and v0.25.0 (August 15).
- **Documentation:** The user manual is located at `https://docs.rubocop.org/`.
- **Operating System:** Runs on BSD and other Unix-like systems.

## FAQs
### Q: What is RuboCop used for?
A: RuboCop is used to analyze Ruby source code statically to enforce consistent style and formatting. It functions both as a linter to find errors and as a formatter to beautify code.

### Q: Is RuboCop free to use?
A: Yes, RuboCop is free software distributed under the Expat license, allowing users to run, study, change, and distribute it freely.

### Q: Where can the source code for RuboCop be found?
A: The source code is maintained in a Git repository hosted on GitHub at `https://github.com/rubocop/rubocop.git`.

### Q: Is RuboCop available for Debian or Ubuntu systems?
A: Yes, RuboCop is available as a standard package in both Debian (since at least February 2017) and Ubuntu repositories under the package name "rubocop".

## Why It Matters
RuboCop plays a critical role in the Ruby development ecosystem by enforcing community coding standards and best practices. As a static code analyzer and formatter, it automates the process of maintaining code consistency, which reduces developer friction during code reviews and minimizes syntax-related bugs. By serving as an objective "linter," it ensures that codebases remain readable and maintainable regardless of the size of the development team.

The tool's classification as free software under the Expat license ensures that it remains accessible to all developers and can be adapted to specific project needs. Its integration into major package managers like Debian, Ubuntu, FreeBSD, and Guix highlights its status as a standard, trusted utility in the open-source world. The existence of a dedicated user manual and active development history further solidifies its position as an essential utility for professional Ruby programming.

## Notable For
- **Dual Functionality:** Combines features of both a static code analyzer (linter) and a code formatter in one tool.
- **Broad Distribution:** Natively available in the official repositories of major operating systems including Ubuntu, Debian, and FreeBSD.
- **Open Standards:** Distributed under the highly permissive Expat license.
- **Ecosystem Integration:** Identified by a specific RubyGems gem ID and available via the Guix package manager as `ruby-rubocop`.

## Body

### Technical Definition and Function
RuboCop is a static code analyzer and code formatter specifically designed for the Ruby programming language. It falls under the software category of "lint" tools. The tool performs analysis without executing the program, checking source code against defined rules to identify stylistic issues and potential errors.

### Licensing and Software Type
RuboCop is classified as free software. It is distributed under the **Expat license**, which grants users the freedom to run, study, change, and distribute the software and any modified versions. The tool has a copyrighted status but is freely available to the public.

### Availability and Installation
The tool is widely supported across different operating systems and package managers:
- **Debian:** Available as the source package `rubocop` (stable release tracked as of December 2024).
- **Ubuntu:** Installable via the `rubocop` package.
- **FreeBSD:** Available via the port `devel/rubygem-rubocop`.
- **Guix:** Installable using the variable name `ruby-rubocop`.
- **RubyGems:** Distributed with the gem ID `rubocop`.

### Development and Version History
The project is actively maintained, with source code available via HTTPS and Git Wire Protocol at `github.com/rubocop/rubocop.git`.

Development activity recorded in the provided sources indicates frequent updates throughout 2014. Key releases from that period include:
- **v0.19.0:** Released March 13, 2014.
- **v0.20.0:** Released April 2, 2014.
- **v0.22.0:** Released May 20, 2014.
- **v0.25.0:** Released August 15, 2014.

### Documentation and Resources
The official user manual is hosted at `https://docs.rubocop.org/`. The preferred official website for the project is `https://rubocop.org/`, which provides information in English.

## References

1. [Release 0.19.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.19.0)
2. [Release 0.19.1. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.19.1)
3. [Release 0.20.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.20.0)
4. [Release 0.20.1. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.20.1)
5. [Release 0.21.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.21.0)
6. [Release 0.22.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.22.0)
7. [Release 0.23.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.23.0)
8. [Release 0.24.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.24.0)
9. [Release 0.24.1. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.24.1)
10. [Release 0.25.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.25.0)
11. [Release 0.26.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.26.0)
12. [Release 0.26.1. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.26.1)
13. [Release 0.27.0. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.27.0)
14. [Release 0.27.1. 2014](https://github.com/rubocop/rubocop/releases/tag/v0.27.1)
15. [Release 0.29.0. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.29.0)
16. [Release 0.29.1. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.29.1)
17. [Release 0.30.0. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.30.0)
18. [Release 0.30.1. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.30.1)
19. [Release 0.32.0. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.32.0)
20. [Release 0.32.1. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.32.1)
21. [Release 0.33.0. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.33.0)
22. [Release 0.34.1. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.34.1)
23. [Release 0.34.2. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.34.2)
24. [Release 0.35.0. 2015](https://github.com/rubocop/rubocop/releases/tag/v0.35.0)
25. [Release 0.36.0. 2016](https://github.com/rubocop/rubocop/releases/tag/v0.36.0)
26. [Release 0.37.1. 2016](https://github.com/rubocop/rubocop/releases/tag/v0.37.1)
27. [Release 0.37.2. 2016](https://github.com/rubocop/rubocop/releases/tag/v0.37.2)
28. [Release 0.41.2. 2016](https://github.com/rubocop/rubocop/releases/tag/v0.41.2)
29. [Release 0.42.0. 2016](https://github.com/rubocop/rubocop/releases/tag/v0.42.0)
30. [Release 0.47.1. 2017](https://github.com/rubocop/rubocop/releases/tag/v0.47.1)
31. [Release 0.48.1. 2017](https://github.com/rubocop/rubocop/releases/tag/v0.48.1)
32. [Release 0.49.1. 2017](https://github.com/rubocop/rubocop/releases/tag/v0.49.1)
33. [Release 0.52.1. 2017](https://github.com/rubocop/rubocop/releases/tag/v0.52.1)
34. [Release 0.53.0. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.53.0)
35. [Release 0.57.1. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.57.1)
36. [Release 0.57.2. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.57.2)
37. [Release 0.58.1. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.58.1)
38. [Release 0.58.2. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.58.2)
39. [Release 0.59.0. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.59.0)
40. [Release 0.59.1. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.59.1)
41. [Release 0.59.2. 2018](https://github.com/rubocop/rubocop/releases/tag/v0.59.2)
42. [Release 0.61.1. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.61.1)
43. [Release 0.63.1. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.63.1)
44. [Release 0.67.1. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.67.1)
45. [Release 0.67.2. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.67.2)
46. [Release 0.68.1. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.68.1)
47. [Release 0.75.1. 2019](https://github.com/rubocop/rubocop/releases/tag/v0.75.1)
48. [Release 0.80.1. 2020](https://github.com/rubocop/rubocop/releases/tag/v0.80.1)
49. [Release 0.85.1. 2020](https://github.com/rubocop/rubocop/releases/tag/v0.85.1)
50. [Release 0.87.1. 2020](https://github.com/rubocop/rubocop/releases/tag/v0.87.1)