File tree Expand file tree Collapse file tree 9 files changed +162
-652
lines changed Expand file tree Collapse file tree 9 files changed +162
-652
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # SPDX-License-Identifier: GPL-2.0-only
4+ # This file is part of Scapy RPC
5+ # See https://scapy.net/ for more information
6+
7+ # Check that all Scapy RPC files have a SPDX
8+
9+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
10+ ROOT_DIR=$SCRIPT_DIR /..
11+
12+ # http://mywiki.wooledge.org/BashFAQ/024
13+ # This documents an absolutely WTF behavior of bash.
14+ set +m
15+ shopt -s lastpipe
16+
17+ function check_path() {
18+ cd $ROOT_DIR
19+ RCODE=0
20+ for ext in " ${@: 2} " ; do
21+ find $1 -name " *.$ext " | while read f; do
22+ if [[ " $f " == * " /ply/" * ]]; then
23+ # Skip PLY
24+ continue
25+ fi
26+ if [[ -z $( grep " SPDX" $f ) ]]; then
27+ echo " $f "
28+ RCODE=1
29+ fi
30+ done
31+ done
32+ return $RCODE
33+ }
34+
35+ check_path midl-to-scapy py || exit $?
36+ check_path scapy-rpc py || exit $?
Original file line number Diff line number Diff line change 1+ name : Scapy RPC unit tests
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+ # The branches below must be a subset of the branches above
8+ branches : [master]
9+
10+ # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : ${{ !contains(github.ref, 'master')}}
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ health :
20+ name : Code health check
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout Scapy-rpc
24+ uses : actions/checkout@v4
25+ - name : Setup Python
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.13"
29+ - name : Check black compliance
30+ uses : psf/black@stable
31+ with :
32+ src : " ./scapy-rpc"
33+ use_pyproject : true
34+ - name : Run twine check
35+ run : tox -e twine
36+ spdx :
37+ name : Check SPDX identifiers
38+ runs-on : ubuntu-latest
39+ steps :
40+ - name : Checkout Scapy
41+ uses : actions/checkout@v4
42+ - name : Launch script
43+ run : bash .github/check_spdx.sh
Original file line number Diff line number Diff line change 4242 "extras" : [
4343 # Protocols not listed in the "list"
4444 "ms-oxcrpc" ,
45- ]
45+ ],
4646 },
4747 {
4848 "name" : "SharePoint Protocols" ,
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: GPL-2.0-only
2+ # This file is part of Scapy RPC
3+ # See https://scapy.net/ for more information
4+
15"""
26Scapy RPC definitions
37"""
1115
1216def scapy_ext (plg ):
1317 plg .config ("Scapy RPC" , __version__ )
14- for lay in pathlib .Path (__file__ ).parent .glob (' *.py' ):
18+ for lay in pathlib .Path (__file__ ).parent .glob (" *.py" ):
1519 if lay .name == "__init__.py" :
1620 continue
1721 plg .register (
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments