fmidev / smartmet-plugin-timeseries

MIT License
2 stars 1 forks source link

Break down the Query::Query constructor into small, sane pieces #78

Closed mikaelhg closed 1 year ago

mikaelhg commented 1 year ago

The 371 line constructor does too many different things, many of which are not constructor-like things, and some of which aren't query-like things.

Set up a post-constructor initialization procedure for non-constructor things, and split stuff that's specific for particular formatting choices into their own methods.

mheiskan commented 1 year ago

We use CodeChecker internally to monitor compiler warnings and code complexity. Currently there are 17 warnings of type "readability-function-cognitive-complexity" for smartmet-plugin-timeseries, including two on Query.cpp (the other warning is about "parse_parameters"). The number of warnings will be gradually reduced, but since the server consists of tens of packages the progress is slow. Since a separate issue for each such warning is not helpful, I'll close this issue.