-
Notifications
You must be signed in to change notification settings - Fork 592
✨ Detect .NET property-based fuzz testing #4860
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
base: main
Are you sure you want to change the base?
✨ Detect .NET property-based fuzz testing #4860
Conversation
Detect use of FsCheck in C# and F# code for the fuzzing check. Signed-off-by: martincostello <[email protected]>
d730ac6 to
b0f34b0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4860 +/- ##
==========================================
+ Coverage 66.80% 69.59% +2.78%
==========================================
Files 230 251 +21
Lines 16602 15657 -945
==========================================
- Hits 11091 10896 -195
+ Misses 4808 3891 -917
- Partials 703 870 +167 🚀 New features to boost your workflow:
|
Update the Markdown file generated from the YAML file. Signed-off-by: martincostello <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for detecting property-based fuzz testing in .NET languages (C# and F#) using the FsCheck library. It extends the fuzzing check to recognize FsCheck and its test framework integrations (NUnit, Xunit, and Expecto) through import statement pattern matching.
Key Changes:
- Added F# as a supported language with regex-based detection for FsCheck imports
- Extended C# fuzzing detection to recognize FsCheck property-based testing libraries
- Added comprehensive test coverage for both C# and F# FsCheck detection scenarios
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/fuzzers/fuzzers.go | Added constants for C# and F# property-based testing fuzzer identifiers |
| finding/probe.go | Added F# to the list of validated supported languages |
| docs/checks/internal/checks.yaml | Updated fuzzing check documentation to include FsCheck for C# and F# |
| docs/checks/fuzzing/README.md | Added FsCheck to the list of supported fuzzers with minor formatting improvements |
| docs/checks.md | Updated fuzzing check description to mention C# and F# FsCheck support |
| clients/languages.go | Added F# language constant and updated C# documentation URL |
| checks/raw/fuzzing_test.go | Added 10 test cases covering various FsCheck import scenarios for C# and F# |
| checks/raw/fuzzing.go | Implemented fuzzing detection logic with regex patterns for C# and F# FsCheck imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resolve Copilot comment by fixing casing in comment. Signed-off-by: martincostello <[email protected]>
What kind of change does this PR introduce?
Add feature to detect use of FsCheck in C# and F# code for the fuzzing check.
What is the current behavior?
Use of FsCheck in C# or F# test code does not contribute to the fuzzing check.
What is the new behavior (if this is a feature change)?**
Use of
FsCheck,FsCheck.Nunit,FsCheck.XunitorExpecto.FsCheckin.csorfsfiles counts as property-based fuzz testing for C# and F# respectively.Which issue(s) this PR fixes
NONE
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note(In particular, describe what changes users might need to make in their
application as a result of this pull request.)