Let's Talk About Grep! 🔍
Today, we are excited to introduce our grep analysis engine.
Grep is a long-standing tool that is essential to developers. It allows you to search files for matches against given regular expressions. Now, we are bringing grep to Code Climate to give teams a way to detect specific patterns in their code. The issues emitted by the grep engine are entirely configurable. You can use the grep engine to enforce specific style rules (e.g. don't define methods that start with
get_), or to help burn-down existing constructs – as seen in this rule to deprecate use of octicons:
grep: enabled: true config: patterns: octicons-deprecated: pattern: \.octicon annotation: "Don't use octicons" severity: minor categories: Compatibility path_patterns: - "**/*.slim"
This will generate the following issues on Code Climate:
Check out our documentation to set up your own grep patterns!