Merge remote-tracking branch 'origin/topic/awelzel/add-spicy-format'

* origin/topic/awelzel/add-spicy-format:
  testing/external: Update private baselines
  analyzer/syslog: Reformat with spicy-format
  analyzer/finger: Reformat with spicy-format
  scripts/spicy: Reformat with spicy-format
  pre-commit: Add spicy-format
This commit is contained in:
Arne Welzel 2024-09-05 19:19:31 +02:00
commit 2907d9feee
8 changed files with 44 additions and 17 deletions

View file

@ -32,3 +32,10 @@ repos:
hooks: hooks:
- id: typos - id: typos
exclude: '^(.typos.toml|src/SmithWaterman.cc|testing/.*|auxil/.*|scripts/base/frameworks/files/magic/.*|CHANGES)$' exclude: '^(.typos.toml|src/SmithWaterman.cc|testing/.*|auxil/.*|scripts/base/frameworks/files/magic/.*|CHANGES)$'
- repo: https://github.com/bbannier/spicy-format
rev: v0.15.0
hooks:
- id: spicy-format
# TODO: Reformat existing large analyzers just before 8.0.
exclude: '(^testing/.*)|(protocol/ldap/.*)|(protocol/quic/.*)|(protocol/websocket/.*)'

15
CHANGES
View file

@ -1,3 +1,18 @@
7.1.0-dev.247 | 2024-09-05 19:19:31 +0200
* testing/external: Update private baselines (Arne Welzel, Corelight)
* analyzer/syslog: Reformat with spicy-format (Arne Welzel, Corelight)
* analyzer/finger: Reformat with spicy-format (Arne Welzel, Corelight)
* scripts/spicy: Reformat with spicy-format (Arne Welzel, Corelight)
* pre-commit: Add spicy-format (Arne Welzel, Corelight)
This excludes the larger protocol analyzers. These should be formatted
during the 7.2 cycle, shortly before 8.0.
7.1.0-dev.241 | 2024-09-04 14:53:19 -0700 7.1.0-dev.241 | 2024-09-04 14:53:19 -0700
* Check for netbios to avoid reporting extra bad DNS opcodes (Tim Wojtulewicz, Corelight) * Check for netbios to avoid reporting extra bad DNS opcodes (Tim Wojtulewicz, Corelight)

View file

@ -1 +1 @@
7.1.0-dev.241 7.1.0-dev.247

View file

@ -507,4 +507,3 @@ public function vector_size(id: string): uint64 &cxxname="zeek::spicy::rt::vecto
## ##
## v: opaque handle to the Zeek vector, as returned by other functions ## v: opaque handle to the Zeek vector, as returned by other functions
public function vector_size(v: ZeekVector): uint64 &cxxname="zeek::spicy::rt::vector_size"; public function vector_size(v: ZeekVector): uint64 &cxxname="zeek::spicy::rt::vector_size";

View file

@ -22,9 +22,13 @@ public type File = unit(mime_type: optional<string> = Null, size: optional<uint6
zeek::file_set_size(*size, self.fid); zeek::file_set_size(*size, self.fid);
} }
: bytes &chunked &eod { zeek::file_data_in($$, self.fid); } : bytes &chunked &eod {
zeek::file_data_in($$, self.fid);
}
on %finally { zeek::file_end(self.fid); } on %finally {
zeek::file_end(self.fid);
}
## Zeek-side file ID ## Zeek-side file ID
var fid: string; var fid: string;

View file

@ -14,7 +14,9 @@ public type Request = unit {
: OptionalWhiteSpace; : OptionalWhiteSpace;
switch { switch {
-> : /\/W/ { self.whois = True; } -> : /\/W/ {
self.whois = True;
}
-> : void; -> : void;
}; };

View file

@ -1 +1 @@
e051f29d1f03f2264b8cf1ff5ed9bfba9d326c45 5db3bb717a3507ffb3b94766dbe485855286571d