From 7bf8d05e55584bcada317514674d52e9405aab60 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Fri, 10 Sep 2021 11:41:21 +0800 Subject: [PATCH 1/5] Add lgtm.yml Signed-off-by: Stephen Sun --- lgtm.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lgtm.yml diff --git a/lgtm.yml b/lgtm.yml new file mode 100644 index 0000000000..3067bd9e7c --- /dev/null +++ b/lgtm.yml @@ -0,0 +1,39 @@ +path_classifiers: + test: + exclude: tests +extraction: + python: + python_setup: + version: "2" + cpp: + prepare: + packages: + - libxml-simple-perl + - aspell + - aspell-en + - libhiredis-dev + - libnl-3-dev + - libnl-genl-3-dev + - libnl-route-3-dev + - libnl-nf-3-dev + - swig3.0 + - libpython2.7-dev + - libgtest-dev + - dh-exec + - doxygen + - graphviz + after_prepare: + - git clone -b 201911 https://github.com/Azure/sonic-swss-common; pushd sonic-swss-common; ./autogen.sh; fakeroot dpkg-buildpackage -us -uc -b; popd + - dpkg-deb -x libswsscommon_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libswsscommon-dev_1.0.0_amd64.deb $LGTM_WORKSPACE + - git clone -b 201911 --recursive https://github.com/Azure/sonic-sairedis; pushd sonic-sairedis; ./autogen.sh; DEB_BUILD_OPTIONS=nocheck SWSS_COMMON_INC="$LGTM_WORKSPACE/usr/include" SWSS_COMMON_LIB="$LGTM_WORKSPACE/usr/lib/x86_64-linux-gnu" fakeroot debian/rules binary-syncd-vs; popd + - dpkg-deb -x libsairedis_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libsairedis-dev_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libsaimetadata_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libsaimetadata-dev_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libsaivs_1.0.0_amd64.deb $LGTM_WORKSPACE + - dpkg-deb -x libsaivs-dev_1.0.0_amd64.deb $LGTM_WORKSPACE + configure: + command: + - ./autogen.sh + - ./configure --prefix=/usr --with-extra-inc=$LGTM_WORKSPACE/usr/include --with-extra-lib=$LGTM_WORKSPACE/usr/lib/x86_64-linux-gnu From fe468051b62f86db7fb46ce02117eda677e83326 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Fri, 8 Oct 2021 22:07:45 +0800 Subject: [PATCH 2/5] Add some missing libs Signed-off-by: Stephen Sun --- lgtm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgtm.yml b/lgtm.yml index 3067bd9e7c..447082d8ab 100644 --- a/lgtm.yml +++ b/lgtm.yml @@ -16,6 +16,8 @@ extraction: - libnl-genl-3-dev - libnl-route-3-dev - libnl-nf-3-dev + - libnl-cli-3-dev + - libhiredis0.14 - swig3.0 - libpython2.7-dev - libgtest-dev From b8010ffc1d358d35ac35d167276af30ad2e1c30b Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Fri, 8 Oct 2021 22:59:06 +0800 Subject: [PATCH 3/5] Add missing libs Signed-off-by: Stephen Sun --- lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgtm.yml b/lgtm.yml index 447082d8ab..4003c81384 100644 --- a/lgtm.yml +++ b/lgtm.yml @@ -17,7 +17,7 @@ extraction: - libnl-route-3-dev - libnl-nf-3-dev - libnl-cli-3-dev - - libhiredis0.14 + - libhiredis-dev - swig3.0 - libpython2.7-dev - libgtest-dev From fa2c96e57038514f58f89449da2e0b40bab1a61b Mon Sep 17 00:00:00 2001 From: stephens Date: Sun, 10 Oct 2021 08:51:55 +0000 Subject: [PATCH 4/5] Fix LGTM error in portsorch.cpp Signed-off-by: stephens --- orchagent/portsorch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 82da581b26..e9e85acbfd 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -2718,7 +2718,7 @@ void PortsOrch::doLagMemberTask(Consumer &consumer) void PortsOrch::doTask() { - constexpr auto tableOrder = { + auto tableOrder = { APP_PORT_TABLE_NAME, APP_LAG_TABLE_NAME, APP_LAG_MEMBER_TABLE_NAME, From 014c6e09c8e790dfcaac343dbc4c2dab1602951f Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Mon, 11 Oct 2021 16:10:20 +0800 Subject: [PATCH 5/5] Revert "Fix LGTM error in portsorch.cpp" To fix LGTM in this PR is for dry run only. It should be done by cherry-picking PR#1250 With portsorch.cpp fixed, dry run passed. This reverts commit fa2c96e57038514f58f89449da2e0b40bab1a61b. --- orchagent/portsorch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index e9e85acbfd..82da581b26 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -2718,7 +2718,7 @@ void PortsOrch::doLagMemberTask(Consumer &consumer) void PortsOrch::doTask() { - auto tableOrder = { + constexpr auto tableOrder = { APP_PORT_TABLE_NAME, APP_LAG_TABLE_NAME, APP_LAG_MEMBER_TABLE_NAME,