diff --git a/envoy/stats/primitive_stats_macros.h b/envoy/stats/primitive_stats_macros.h index a3b2713bad072..e27ab61247475 100644 --- a/envoy/stats/primitive_stats_macros.h +++ b/envoy/stats/primitive_stats_macros.h @@ -17,8 +17,8 @@ namespace Envoy { * * By convention, starting with #7083, we sort the lines of this macro block, so * all the counters are grouped together, then all the gauges, etc. We do not - * use clang-format-on/off etc. "./tools/code_format/check_format.py fix" will take care of - * lining up the backslashes. + * use clang-format-on/off etc. "bazel run //tools/code_format:check_format -- fix" will take + * care of lining up the backslashes. * * Now actually put these stats somewhere, usually as a member of a struct: * struct MyCoolStats { diff --git a/envoy/stats/stats_macros.h b/envoy/stats/stats_macros.h index 47caffb36d951..123bb7983624e 100644 --- a/envoy/stats/stats_macros.h +++ b/envoy/stats/stats_macros.h @@ -25,8 +25,8 @@ namespace Envoy { * * By convention, starting with #7083, we sort the lines of this macro block, so * all the counters are grouped together, then all the gauges, etc. We do not - * use clang-format-on/off etc. "./tools/code_format/check_format.py fix" will take care of - * lining up the backslashes. + * use clang-format-on/off etc. "bazel run //tools/code_format:check_format -- fix" will take + * care of lining up the backslashes. * * Now actually put these stats somewhere, usually as a member of a struct: * struct MyCoolStats { diff --git a/support/README.md b/support/README.md index 69d5c93f634fe..a9ee34d17c84b 100644 --- a/support/README.md +++ b/support/README.md @@ -55,19 +55,19 @@ affected files manually or run the provided formatting script. To run the format fix script directly: -``` -./tools/code_format/check_format.py fix && ./tools/code_format/format_python_tools.sh fix +```console +bazel run //tools/code_format:check_format -- fix && ./tools/code_format/format_python_tools.sh fix ``` To run the format fix script under Docker: -``` +```console ./ci/run_envoy_docker.sh './ci/do_ci.sh format' ``` To run clang-tidy under Docker, run the following (this creates a full compilation db and takes a long time): -``` +```console ./ci/run_envoy_docker.sh ci/do_ci.sh bazel.clang_tidy ``` diff --git a/tools/code_format/check_format.py b/tools/code_format/check_format.py index 7add4a3922170..e01821e685105 100755 --- a/tools/code_format/check_format.py +++ b/tools/code_format/check_format.py @@ -1048,7 +1048,9 @@ def run_checks(self): if self.check_error_messages(): if self.args.operation_type == "check": - print("ERROR: check format failed. run '//tools/code_format:check_format -- fix'") + print( + "ERROR: check format failed. run 'bazel run //tools/code_format:check_format -- fix'" + ) else: print("ERROR: check format failed. diff has been applied'") sys.exit(1)