You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use AI tools to help find or draft a bug report, please mention that and make sure you have personally verified the steps and details before submitting.
49
+
Purely AI-generated reports are not supported and might be closed; a quick human check keeps triage efficient for everyone.
50
+
43
51
### Enhancements / feature requests
44
52
45
53
If you want a feature in Scapy, but cannot implement it yourself or
@@ -53,6 +61,18 @@ of function calls, packet creations, etc.).
53
61
54
62
### Coding style & conventions
55
63
64
+
- All commits should include the `AI-Assisted: (yes/no) [tool]` tag. This is used to disclose the AI tools that are used when authoring. You must check the commits you produce, or your PR might be closed. The tag may look like such:
65
+
66
+
```
67
+
AI-Assisted: yes (Claude Opus 4.7)
68
+
```
69
+
or
70
+
71
+
```
72
+
AI-Assisted: no
73
+
```
74
+
This guideline is adapted with thanks to [Wireshark's AI usage statement](https://www.wireshark.org/docs/wsdg_html_chunked/ChSrcContribute.html).
75
+
56
76
- The code should be PEP-8 compliant; you can check your code with
57
77
[pep8](https://pypi.python.org/pypi/pep8) and the command `tox -e flake8`
58
78
@@ -63,20 +83,18 @@ of function calls, packet creations, etc.).
- Avoid creating unnecessary `list` objects, particularly if they
67
-
can be huge (e.g., when possible, use `for line in fdesc` instead of
68
-
`for line in fdesc.readlines()`; more generally prefer generators over
69
-
lists).
70
-
71
86
### Tests
72
87
73
-
Please consider adding tests for your new features or that trigger the
74
-
bug you are fixing. This will prevent a regression from being
75
-
unnoticed. Do not use the variable `_` in your tests, as it could break them.
88
+
We require adding tests for all new features or bug fixes, or a justification as to why they are not relevant. We know it's annoying, but Scapy is all about parsing and dissecting weird protocols us maintainers will never encounter. Having good tests is the only way to keep the code maintainable.
89
+
90
+
- If you are fixing a bug, provide a one-liner that reproduced the bug you are fixing.
91
+
- If you are introducing dissectors, provide at least a very simple "dissect" / "build" of real packets with simple assertions.
92
+
- Tests can be very simple. It's much better to have dumb tests that break when one does changes than no tests.
93
+
- Do not use the variable `_` in your tests, as it could break them.
76
94
77
95
If you find yourself in a situation where your tests locally succeed but
78
96
fail if executed on the CI, try to enable the debugging option for the
79
-
dissector by setting `conf.debug_dissector = 1`.
97
+
dissector by setting `conf.debug_dissector = 1`. In doubt, feel free to ask maintainers for help.
0 commit comments