Skip to content

Improve Nighthawk's check_format.py #815

@mum4k

Description

@mum4k

Nighthawk's check_format.py is reusing the Envoy version.

Envoy includes a set of Envoy specific checks that cannot be applied in the Nighthawk codebase without code changes upstream. As an example, the tool checks that the TRY_ASSERT_MAIN_THREAD is used instead of a raw try, yet the TRY_ASSERT_MAIN_THREAD cannot be used in Nighthawk's code in its current form due to namespace issues.

Nighthawk was getting around this by running check_format.py with an absolute path, so checks like this excluded these Envoy specific verifications. This however was a dependence on an undocumented behavior r even a bug.

Envoy modified their check_format.py in envoyproxy/envoy#20108, making it impossible to execute with absolute paths.

As a workaround we are now executing the script with a path like ./../nighthawk which again allows bypassing of these Envoy specific checks.

We should find a permanent solutions, which could be either of:

  1. standardize a way to exclude checks in Envoy's check_format.py; or
  2. modify code as needed to allow Nighthawk to fully comply with the Envoy specific checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions