mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Bump pre-commit hooks
This commit is contained in:
parent
6d272038fe
commit
b9eabbabba
11 changed files with 28 additions and 28 deletions
|
@ -19,7 +19,7 @@ repos:
|
|||
files: '^testing/btest/.*$'
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v20.1.0
|
||||
rev: v20.1.7
|
||||
hooks:
|
||||
- id: clang-format
|
||||
types_or:
|
||||
|
@ -34,7 +34,7 @@ repos:
|
|||
args: ["-w", "-i", "4", "-ci"]
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.11.4
|
||||
rev: v0.12.1
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
|
@ -46,7 +46,7 @@ repos:
|
|||
- id: cmake-format
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.30.1
|
||||
rev: v1.33.1
|
||||
hooks:
|
||||
- id: typos
|
||||
exclude: '^(.typos.toml|src/SmithWaterman.cc|testing/.*|auxil/.*|scripts/base/frameworks/files/magic/.*|CHANGES|scripts/base/protocols/ssl/mozilla-ca-list.zeek)$'
|
||||
|
|
|
@ -30,7 +30,7 @@ type EventFields: record {
|
|||
option_val: string;
|
||||
};
|
||||
|
||||
event config_line(description: Input::EventDescription, tpe: Input::Event, p: EventFields)
|
||||
event config_line(description: Input::EventDescription, type_: Input::Event, p: EventFields)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ export {
|
|||
##
|
||||
## desc: The :zeek:type:`Input::EventDescription` record which generated the event.
|
||||
##
|
||||
## tpe: The type of input event.
|
||||
## type_: The type of input event.
|
||||
##
|
||||
## item: The intel item being read (of type :zeek:type:`Intel::Item`).
|
||||
##
|
||||
global read_entry: event(desc: Input::EventDescription, tpe: Input::Event, item: Intel::Item);
|
||||
global read_entry: event(desc: Input::EventDescription, type_: Input::Event, item: Intel::Item);
|
||||
|
||||
## This event is raised each time the input framework detects an error
|
||||
## while reading the intel file. It can be used to implement further checks
|
||||
|
@ -46,7 +46,7 @@ export {
|
|||
global read_error: event(desc: Input::EventDescription, message: string, level: Reporter::Level);
|
||||
}
|
||||
|
||||
event Intel::read_entry(desc: Input::EventDescription, tpe: Input::Event, item: Intel::Item)
|
||||
event Intel::read_entry(desc: Input::EventDescription, type_: Input::Event, item: Intel::Item)
|
||||
{
|
||||
Intel::insert(item);
|
||||
}
|
||||
|
|
|
@ -76,16 +76,16 @@ event OpenFlow::cluster_flow_clear(name: string)
|
|||
}
|
||||
@endif
|
||||
|
||||
function register_controller(tpe: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
function register_controller(type_: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
{
|
||||
controller$state$_name = cat(tpe, name);
|
||||
controller$state$_plugin = tpe;
|
||||
controller$state$_name = cat(type_, name);
|
||||
controller$state$_plugin = type_;
|
||||
|
||||
# we only run the init functions on the manager.
|
||||
if ( Cluster::local_node_type() != Cluster::MANAGER )
|
||||
return;
|
||||
|
||||
register_controller_impl(tpe, name, controller);
|
||||
register_controller_impl(type_, name, controller);
|
||||
}
|
||||
|
||||
function unregister_controller(controller: Controller)
|
||||
|
|
|
@ -113,12 +113,12 @@ export {
|
|||
## Function to register a controller instance. This function
|
||||
## is called automatically by the plugin _new functions.
|
||||
##
|
||||
## tpe: Type of this plugin.
|
||||
## type_: Type of this plugin.
|
||||
##
|
||||
## name: Unique name of this controller instance.
|
||||
##
|
||||
## controller: The controller to register.
|
||||
global register_controller: function(tpe: OpenFlow::Plugin, name: string, controller: Controller);
|
||||
global register_controller: function(type_: OpenFlow::Plugin, name: string, controller: Controller);
|
||||
|
||||
## Function to unregister a controller instance. This function
|
||||
## should be called when a specific controller should no longer
|
||||
|
@ -253,7 +253,7 @@ function controller_init_done(controller: Controller)
|
|||
|
||||
# Functions that are called from cluster.zeek and non-cluster.zeek
|
||||
|
||||
function register_controller_impl(tpe: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
function register_controller_impl(type_: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
{
|
||||
if ( controller$state$_name in name_to_controller )
|
||||
{
|
||||
|
|
|
@ -25,12 +25,12 @@ function flow_clear(controller: Controller): bool
|
|||
return F;
|
||||
}
|
||||
|
||||
function register_controller(tpe: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
function register_controller(type_: OpenFlow::Plugin, name: string, controller: Controller)
|
||||
{
|
||||
controller$state$_name = cat(tpe, name);
|
||||
controller$state$_plugin = tpe;
|
||||
controller$state$_name = cat(type_, name);
|
||||
controller$state$_plugin = type_;
|
||||
|
||||
register_controller_impl(tpe, name, controller);
|
||||
register_controller_impl(type_, name, controller);
|
||||
}
|
||||
|
||||
function unregister_controller(controller: Controller)
|
||||
|
|
|
@ -58,7 +58,7 @@ type FileLine: record {
|
|||
s: string;
|
||||
};
|
||||
|
||||
event Exec::line(description: Input::EventDescription, tpe: Input::Event, s: string, is_stderr: bool)
|
||||
event Exec::line(description: Input::EventDescription, type_: Input::Event, s: string, is_stderr: bool)
|
||||
{
|
||||
local result = results[description$name];
|
||||
if ( is_stderr )
|
||||
|
@ -77,7 +77,7 @@ event Exec::line(description: Input::EventDescription, tpe: Input::Event, s: str
|
|||
}
|
||||
}
|
||||
|
||||
event Exec::file_line(description: Input::EventDescription, tpe: Input::Event, s: string)
|
||||
event Exec::file_line(description: Input::EventDescription, type_: Input::Event, s: string)
|
||||
{
|
||||
local parts = split_string1(description$name, /_/);
|
||||
local name = parts[0];
|
||||
|
|
|
@ -2229,7 +2229,7 @@ bool TableVal::UpdateTimestamp(Val* index) {
|
|||
|
||||
ListValPtr TableVal::RecreateIndex(const detail::HashKey& k) const { return GetTableHash()->RecoverVals(k); }
|
||||
|
||||
void TableVal::CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnChangeType tpe) {
|
||||
void TableVal::CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnChangeType type) {
|
||||
if ( ! change_func || ! index || in_change_func )
|
||||
return;
|
||||
|
||||
|
@ -2258,7 +2258,7 @@ void TableVal::CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnCh
|
|||
|
||||
vl.emplace_back(NewRef{}, this);
|
||||
|
||||
switch ( tpe ) {
|
||||
switch ( type ) {
|
||||
case ELEMENT_NEW:
|
||||
vl.emplace_back(BifType::Enum::TableChange->GetEnumVal(BifEnum::TableChange::TABLE_ELEMENT_NEW));
|
||||
break;
|
||||
|
@ -2290,7 +2290,7 @@ void TableVal::CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnCh
|
|||
in_change_func = false;
|
||||
}
|
||||
|
||||
void TableVal::SendToStore(const Val* index, const TableEntryVal* new_entry_val, OnChangeType tpe) {
|
||||
void TableVal::SendToStore(const Val* index, const TableEntryVal* new_entry_val, OnChangeType type) {
|
||||
if ( broker_store.empty() || ! index )
|
||||
return;
|
||||
|
||||
|
@ -2316,7 +2316,7 @@ void TableVal::SendToStore(const Val* index, const TableEntryVal* new_entry_val,
|
|||
return;
|
||||
}
|
||||
|
||||
switch ( tpe ) {
|
||||
switch ( type ) {
|
||||
case ELEMENT_NEW:
|
||||
case ELEMENT_CHANGED: {
|
||||
std::optional<broker::timespan> expiry;
|
||||
|
|
|
@ -1067,10 +1067,10 @@ protected:
|
|||
enum OnChangeType : uint8_t { ELEMENT_NEW, ELEMENT_CHANGED, ELEMENT_REMOVED, ELEMENT_EXPIRED };
|
||||
|
||||
// Calls &change_func.
|
||||
void CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnChangeType tpe);
|
||||
void CallChangeFunc(const ValPtr& index, const ValPtr& old_value, OnChangeType type);
|
||||
|
||||
// Sends data on to backing Broker Store
|
||||
void SendToStore(const Val* index, const TableEntryVal* new_entry_val, OnChangeType tpe);
|
||||
void SendToStore(const Val* index, const TableEntryVal* new_entry_val, OnChangeType type);
|
||||
|
||||
unsigned int ComputeFootprint(std::unordered_set<const Val*>* analyzed_vals) const override;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ on SSL::PSKKeyExchangeModes -> event ssl_extension_psk_key_exchange_modes($conn,
|
|||
|
||||
on SSL::Alert_message -> event ssl_alert($conn, SSL::get_direction(sh), self.level, self.description);
|
||||
|
||||
on SSL::Heartbeat -> event ssl_heartbeat($conn, SSL::get_direction(sh), length, self.tpe, self.payload_length, self.data);
|
||||
on SSL::Heartbeat -> event ssl_heartbeat($conn, SSL::get_direction(sh), length, self.type_, self.payload_length, self.data);
|
||||
|
||||
on SSL::CertificateStatus -> event ssl_stapled_ocsp($conn, $is_orig, self.response);
|
||||
|
||||
|
|
|
@ -856,7 +856,7 @@ function determine_encryption_on(pr: PlaintextRecord, content_type: uint8, hands
|
|||
}
|
||||
|
||||
type Heartbeat = unit(sh: Share, length: uint16) {
|
||||
tpe: uint8;
|
||||
type_: uint8;
|
||||
payload_length: uint16; # don't trust this one - there might still be people testing.
|
||||
data: bytes &size=(length - 3);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue