cppcheck/man
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
..
images Manual: Added a getting started chapter for the GUI 2017-08-12 23:09:13 +02:00
buildman.sh fix a couple of issues in shell scripts found by codacy. 2016-12-25 00:43:47 +01:00
cppcheck-design.docbook
cppcheck.1.xml fix a few typos 2018-05-14 13:11:59 +02:00
manual-ja.docbook Cppcheck_ja.ts is updated (#1099) 2018-02-25 13:50:03 +01:00
manual.docbook Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
writing-rules-1.docbook man: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-29 13:15:08 +02:00
writing-rules-2.docbook Manual: Add internal links 2011-07-02 16:21:58 +02:00
writing-rules-3.docbook Manual: Add internal links 2011-07-02 16:21:58 +02:00