From 1734c2d9b1c15a40bda78d27143abfe1f7539207 Mon Sep 17 00:00:00 2001 From: Randolph Sapp Date: Mon, 28 Oct 2024 12:08:36 -0500 Subject: [PATCH] fix(email): do not attempt to validate address The regex expression to correctly validate an email address is incredibly long and unnecessarily complex for what we are trying to accomplish here [1]. Instead of validating the email address, let's just make sure two values separated with an "@" are present. [1] https://en.wikipedia.org/wiki/Email_address#Syntax Signed-off-by: Randolph Sapp --- commit_check/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commit_check/__init__.py b/commit_check/__init__.py index 7d1ab0c..a88235c 100644 --- a/commit_check/__init__.py +++ b/commit_check/__init__.py @@ -38,13 +38,13 @@ }, { 'check': 'author_email', - 'regex': r'^\S+@\S+\.\S+$', + 'regex': r'^.+@.+$', 'error': 'The committer\'s email seems invalid', 'suggest': 'run command `git config user.email yourname@example.com`', }, { 'check': 'commit_signoff', - 'regex': r'Signed-off-by:.*[A-Za-z0-9]\s+<[\w\.]+@([\w-]+\.)+[\w-]{2,4}>', + 'regex': r'Signed-off-by:.*[A-Za-z0-9]\s+<.+@.+>', 'error': 'Signed-off-by not found in latest commit', 'suggest': 'run command `git commit -m "conventional commit message" --signoff`', }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy