You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "jihuayu (via GitHub)" <gi...@apache.org> on 2023/11/10 08:58:45 UTC

[I] The Sonar linter is too strict for test code. [kvrocks]

jihuayu opened a new issue, #1889:
URL: https://github.com/apache/kvrocks/issues/1889

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
   
   
   ### Motivation
   
   I noticed that many PRs fail the Sonar linter due to extensive code repetition in the TEST files. In such cases, the reviewer is required to manually inspect the results from Sonar. I believe that the Sonar linter should not be applied to test files. Moreover, the red cross on the commit message is not beautiful.
   
   ### Solution
   
   In my opinion, it is unnecessary for the Sonar linter to take effect on test files.
   Or, we could consider add additional Sonar linter rules for the test folder.
   
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "jihuayu (via GitHub)" <gi...@apache.org>.
jihuayu closed issue #1889: The Sonar linter is too strict for test code.
URL: https://github.com/apache/kvrocks/issues/1889


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1820163204

   @julic20s We didn't aware this, I have changed it to C++17 now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "jihuayu (via GitHub)" <gi...@apache.org>.
jihuayu commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1810050214

   > I believe we still need to maintain some level of code quality, even in our test code.
   
   Do we need to fix code smells in the history code?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "jihuayu (via GitHub)" <gi...@apache.org>.
jihuayu commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805607146

   Can we also exclude Code Smells, in addition to Duplicated Lines?
   [![image](https://github.com/apache/kvrocks/assets/32858525/358d1f78-e7a3-42c9-91c7-9ceba827572e)](https://sonarcloud.io/component_measures?metric=new_technical_debt&view=list&pullRequest=1881&id=apache_kvrocks)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805667682

   > Can we also exclude Code Smells, in addition to Duplicated Lines?
   
   I believe we still need to maintain some level of code quality in our tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "julic20s (via GitHub)" <gi...@apache.org>.
julic20s commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1820114701

   Code smells is analysed in C++20(There are many C++ 20 features, such as using enum), but CMAKE_CXX_STANDARD is set to 17. Can Sonar linter change the cpp standard for checking?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805362849

   Seems the previous exclusion rules didn't take effect and now changed, please have a try again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "jihuayu (via GitHub)" <gi...@apache.org>.
jihuayu commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805500076

   I think it would be beneficial to exempt test files from these duplicating check rules as well.
   https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&pullRequest=1881&id=apache_kvrocks&open=AYupwdoAZ8kRMyTUsysu


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805560441

   Yes, we exactly expected to exclude all test files. Seems the rules work well now, refer: https://sonarcloud.io/component_measures?metric=new_duplicated_lines&view=list&pullRequest=1881&id=apache_kvrocks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] The Sonar linter is too strict for test code. [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #1889:
URL: https://github.com/apache/kvrocks/issues/1889#issuecomment-1805596139

   > I think it would be beneficial to exempt test files from these duplicating check rules as well. https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&pullRequest=1881&id=apache_kvrocks&open=AYupwdoAZ8kRMyTUsysu
   
   You can check the latest report, which doesn't include these test files.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org