7-Zip-zstd icon indicating copy to clipboard operation
7-Zip-zstd copied to clipboard

Fix warnings generated by SonarCloud Source Code Analysis

Open mcmilk opened this issue 5 months ago • 2 comments

I have done some setup for the master branch currently.

I will extend it to another branch named SonarCloud - which can be used for testings. Current State: https://sonarcloud.io/project/overview?id=mcmilk_7-Zip-zstd

mcmilk avatar Aug 11 '25 04:08 mcmilk

After merge of Lizard 2.1 branch (#396), this showed a lot of duplications. I resolved many of them with followed commits (reducing dups +7.5% to +3.7%), but it is still not satisfied. The next one would be to do that for FSE, but they are too different in ZSTD and Lizard (but got more duplications now), so it'd expect to find and possibly outsource some common code of following files:

lizard zstd
fse.h fse.h
liz_fse_decompress.c fse_decompress.c
liz_fse_compress.c fse_compress.c
liz_huf_decompress.c huf_decompress.c
liz_huf_compress.c huf_compress.c

There are custom implementations in both, declarations with additional arguments (e. g. like FSE_normalizeCount), etc. So at the moment I'm unsure the effort to satisfy SonarCloud would not bother maintenance (e. g. troubles by next update of Lizard, etc).

sebres avatar Aug 11 '25 21:08 sebres

Those duplications are okay - cause they are like minimal compression tuneables. So we should blacklist them via a special file called sonar-project.properties like this one.

mcmilk avatar Aug 12 '25 05:08 mcmilk