Dear all,

Over the last year, much of the NaviServer source code basis was 
changed. Part of the changes were to extend functionality, improve 
performance, reduce the number of bugs, but most of the changes were 
actually to remove code smells/issues for on the NaviServer code bases. 
In the last years, the quality of static analysis tools (such as 
cppcheck, clang static checker, pclint, ...) has improved, finding more 
potential issues. However, getting these tools installed, and run the
code-bases on it, keeping track of fixed/new issues is a substantial 
amount of work.

Thankfully, Maurizio Martignano set up a website 
(http://sonarsrv.spazioit.com) based on SonarQube, which collects the 
results of various tools and provides means to locate certain code 
smells efficiently. Based on the results on sonarsrv, we could reduce 
the number of issues/code smells from several thousand to serval 
hundreds. We started out with more than 10.000 issues about two years 
ago, which was more than in AOLserver (due to a more differentiated 
typing, trying to use posix-style types internally). By using the code 
static code checkers, the code basis can be made more strict and to make 
certain properties of the code  explicit (e.g. adding "const" 
declarations, adding assertions, reducing the number of implicit 
conversions). By making assumptions explicit, the code bears less 
surprises in boundary cases. Other changes were done to improve 
maintainability (e.g. reducing the scope of variables) and to ease code 
comprehension (e.g. reducing the number of return statements per 
functions, ideally to 1; improving comment ratio, reducing deprecated 
code, etc.).

If one checks the results on sonarsrv, one can see that there are still 
many open issue. Furthermore, one can expect that the number of reported 
issues will rise even without code changes, when the static checkers 
improve. But altogether, i would expect, that the number of changes 
between releases will reduce.

All the best

-gustaf neumann

4.99.11 -> 4.99.12:  195 files changed, 20265 insertions(+), 13421 deletions(-)
4.99.10 -> 4.99.11:  156 files changed,  8613 insertions(+),  3142 deletions(-)
4.99.9  -> 4.99.10:   32 files changed,   404 insertions(+),   123 deletions(-)
4.99.8  -> 4.99.9:   146 files changed,  5595 insertions(+),  4389 deletions(-)
4.99.7  -> 4.99.8:    55 files changed,  1088 insertions(+),   527 deletions(-)
4.99.6  -> 4.99.7:   216 files changed, 20967 insertions(+), 13287 deletions(-)
4.99.5  -> 4.99.6:   198 files changed,  4972 insertions(+),  2657 deletions(-)


------------------------------------------------------------------------------
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to