cppcheck/cfg
rikardfalkeborn 491ee577c6 Support floats in valid config (#1297)
* Add tests for invalid ranges

* Refactor loadLibErrors

This reduces the amount of code slightly and will simplify adding
more tests.

* Handle empty valid field

Before this change, the sequence <valid></valid> in a config file would
result in a segmentation fault. Now an empty field results in the error
message:

cppcheck: Failed to load library configuration file 'mycfg.cfg'. Bad attribute value '""'

* Add support for valid for floating point arguments

Previously, it was not possible to add valid ranges to floating point
arguments since it only handled integers. This made ranges not work well
for floating point arguments since arguments were cast to integers
before the ranges were handled.

Fix this by using doubles instead of integers if the argument is a float.
Add some tests for this and make sure errors are printed with enough
precision (somewhat arbitrarily chosen).

Note that it is still only possible to add integer ranges (i.e. -1:1).

* Add support for floats in configuration valid range

Now that it is possible to handle decimal arguments, there is no reason
to not allow non-integer ranges. Take care to not allow broken
configurations.

* Move check to within if-clause

* Move asin{,f,l} and acos{,f,l} input checks to config file
2018-07-15 22:47:56 +02:00
..
avr.cfg Fixed #8078 (cppcheck-cfg.rng outdated) 2017-07-23 12:09:41 +02:00
bsd.cfg bsd.cfg: Add strlcpy(), fix fts_children() (#1284) 2018-06-08 15:42:49 +02:00
cppcheck-cfg.rng Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
cppcheck-lib.cfg std.cfg: Added support for std::swap. 2017-10-11 13:12:00 +02:00
embedded_sql.cfg astyle 2017-11-05 17:56:24 +01:00
gnu.cfg gnu.cfg Remove redundant function and resource configurations (#1036) 2018-01-16 17:13:15 +01:00
gtk.cfg Gtk library: Add configuration to avoid syntax error, add test file (#1109) 2018-03-10 11:22:10 +01:00
microsoft_sal.cfg microsoft_sal.cfg: Remove redundant define. 2018-07-11 14:03:00 +02:00
motif.cfg Add more interfaces 2017-06-06 23:21:05 +02:00
posix.cfg posix.cfg: Added support for locale_t 2018-06-08 14:43:20 +02:00
qt.cfg qt.cfg: Add obsolete functions with warning and one alternative one. (#1277) 2018-06-05 21:10:35 +02:00
sdl.cfg Fixed #8078 (cppcheck-cfg.rng outdated) 2017-07-23 12:09:41 +02:00
sfml.cfg Fixed #8078 (cppcheck-cfg.rng outdated) 2017-07-23 12:09:41 +02:00
std.cfg Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
windows.cfg windows.cfg: Add _TCHAR platform type. (#1291) 2018-06-20 10:25:39 +02:00
wxwidgets.cfg wxwidgets.cfg: Added support for wxOVERRIDE. 2018-04-27 23:18:34 +02:00