From 1d61c38db26490221e9ac138a982318e8b5e02fd Mon Sep 17 00:00:00 2001 From: Eric Lemes Date: Thu, 1 Feb 2018 10:36:59 +0000 Subject: [PATCH] Registering new SquidSensors only for C++ language. --- .../java/org/sonar/cxx/sensors/squid/CxxSquidSensor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cxx-sensors/src/main/java/org/sonar/cxx/sensors/squid/CxxSquidSensor.java b/cxx-sensors/src/main/java/org/sonar/cxx/sensors/squid/CxxSquidSensor.java index 3ba786ad66..f89f05bb43 100644 --- a/cxx-sensors/src/main/java/org/sonar/cxx/sensors/squid/CxxSquidSensor.java +++ b/cxx-sensors/src/main/java/org/sonar/cxx/sensors/squid/CxxSquidSensor.java @@ -127,8 +127,10 @@ public CxxSquidSensor(CxxLanguage language, } protected void registerSquidSensors(){ - this.squidSensors.add(new CxxFunctionComplexitySquidSensor(this.language)); - this.squidSensors.add(new CxxFunctionSizeSquidSensor(this.language)); + if (this.language.getKey() == "c++"){ + this.squidSensors.add(new CxxFunctionComplexitySquidSensor(this.language)); + this.squidSensors.add(new CxxFunctionSizeSquidSensor(this.language)); + } } @Override