From: Jason Ish Date: Fri, 20 Nov 2020 15:15:37 +0000 (-0600) Subject: github-ci: check for duplicate SIDs in rules/ X-Git-Tag: suricata-6.0.1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb7f80ef6cffd9efedafe763557e40089700ab3e;p=thirdparty%2Fsuricata.git github-ci: check for duplicate SIDs in rules/ --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index dab8cfa69d..f7a68210b0 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -116,6 +116,15 @@ jobs: - uses: actions/checkout@v2 + # Prebuild check for duplicat SIDs + - name: Check for duplicate SIDs + run: | + dups=$(sed -n 's/^alert.*sid:\([[:digit:]]*\);.*/\1/p' ./rules/*.rules|sort|uniq -d|tr '\n' ' ') + if [[ "${dups}" != "" ]]; then + echo "::error::Duplicate SIDs found:${dups}" + exit 1 + fi + # Download and extract dependency archives created during prep # job. - uses: actions/download-artifact@v2