From 8da6c458a8993f36699c68fb371b1d501ac52cc4 Mon Sep 17 00:00:00 2001 From: Chentao Yang Date: Fri, 9 Aug 2024 17:52:39 +0200 Subject: [PATCH] Add a length check of non-comment lines in C/C++ to the cookbook (#89) Co-authored-by: Johannes Maron --- COOKBOOK.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/COOKBOOK.md b/COOKBOOK.md index c1a6a36..2ab4ce1 100644 --- a/COOKBOOK.md +++ b/COOKBOOK.md @@ -7,6 +7,7 @@ A collection of recipes for reLint. Please feel free to contribute! - [Python](#python) - [Django](#django) - [HTML](#html) +- [C/C++](#cc) # Python @@ -104,3 +105,14 @@ A collection of recipes for reLint. Please feel free to contribute! You may use a CSS class instead. filePattern: .*\.(html|vue|jsx|tsx) ``` + +# C/C++ + +```yaml +# This rule requires you to install the extra `regex` dependency. +- name: no line longer than 120 characters in a line (excluding comments) # by @yangcht + pattern: '(?