Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pattern test cases for Alphabet D and E detectors #3584

Merged

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Nov 11, 2024

Description:

This PR added Pattern test cases for detectors starting with Alphabet D and E. It also separate the integration test cases for those detectors.

Tests Output 🚀:

pattern-d-e-tests01
pattern-d-e-tests02

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@@ -31,7 +30,7 @@ var _ detectors.Versioner = (*Scanner)(nil)
var (
// Can use email or username for login.
usernamePat = regexp.MustCompile(`(?im)(?:user|usr|-u|id)\S{0,40}?[:=\s]{1,3}[ '"=]?([a-zA-Z0-9]{4,40})\b`)
emailPat = regexp.MustCompile(`(` + common.EmailPattern + `)`)
emailPat = regexp.MustCompile(common.EmailPattern)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the capturing group is already added to the common Email Pattern.

@kashifkhan0771 kashifkhan0771 changed the title Added pattern test cases for Alphabet D and E detectors [WIP] Added pattern test cases for Alphabet D and E detectors Nov 11, 2024
@kashifkhan0771 kashifkhan0771 marked this pull request as ready for review November 11, 2024 15:17
@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner November 11, 2024 15:17
@zricethezav zricethezav merged commit 9d3813d into trufflesecurity:main Nov 12, 2024
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the tests/pattern-test-cases-d-e branch November 13, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants