From 1f9f46d9f3d8749109c8699e6632d919234411d8 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 1 Oct 2020 10:14:04 +0200 Subject: [PATCH] cpplint: Ignore some uses of `using namespace` While `using namespace` certainly has its downsides, in these cases, the scope is local to a single file, and makes the code _much_ more readable, offsetting any downsides the directive otherwise has. As such, lets tell cpplint to ignore these. Signed-off-by: Gergely Nagy --- examples/Internal/Sketch_Exploration/Sketch_Exploration.ino | 2 +- src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp | 2 +- src/kaleidoscope/device/virtual/Virtual.cpp | 2 +- src/kaleidoscope/plugin/LEDControl.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Internal/Sketch_Exploration/Sketch_Exploration.ino b/examples/Internal/Sketch_Exploration/Sketch_Exploration.ino index 443a9cd7..980de7f6 100644 --- a/examples/Internal/Sketch_Exploration/Sketch_Exploration.ino +++ b/examples/Internal/Sketch_Exploration/Sketch_Exploration.ino @@ -44,7 +44,7 @@ KEYMAPS( ) /* *INDENT-ON* */ -using namespace kaleidoscope::sketch_exploration; +using namespace kaleidoscope::sketch_exploration; // NOLINT(build/namespaces) class BPlugin : public kaleidoscope::Plugin {}; class CPlugin : public kaleidoscope::Plugin {}; diff --git a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp index ed2dca6d..05ea9c04 100644 --- a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp +++ b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp @@ -29,7 +29,7 @@ namespace kaleidoscope { -using namespace logging; +using namespace logging; // NOLINT(build/namespaces) // For each bit set in 'bitfield', output the corresponding string to 'stream' #define FOREACHBIT(bitfield, stream, str0, str1, str2, str3, str4, str5, str6, str7) \ diff --git a/src/kaleidoscope/device/virtual/Virtual.cpp b/src/kaleidoscope/device/virtual/Virtual.cpp index b90a0966..a4bd2b17 100644 --- a/src/kaleidoscope/device/virtual/Virtual.cpp +++ b/src/kaleidoscope/device/virtual/Virtual.cpp @@ -53,7 +53,7 @@ namespace kaleidoscope { namespace device { namespace virt { -using namespace kaleidoscope::logging; +using namespace kaleidoscope::logging; // NOLINT(build/namespaces) //############################################################################## // VirtualKeyScanner diff --git a/src/kaleidoscope/plugin/LEDControl.cpp b/src/kaleidoscope/plugin/LEDControl.cpp index c34fdc5f..ecebc803 100644 --- a/src/kaleidoscope/plugin/LEDControl.cpp +++ b/src/kaleidoscope/plugin/LEDControl.cpp @@ -19,7 +19,7 @@ #include "kaleidoscope_internal/LEDModeManager.h" #include "kaleidoscope/keyswitch_state.h" -using namespace kaleidoscope::internal; +using namespace kaleidoscope::internal; // NOLINT(build/namespaces) namespace kaleidoscope { namespace plugin {