Commit Graph

417 Commits

Author SHA1 Message Date
Daniel Marjamäki 011c5e97f9 gui-manual: Preferences 2020-07-19 08:56:14 +02:00
Daniel Marjamäki 9ec5ae2929 GUI: Started writing a manual 2020-07-18 15:27:46 +02:00
Daniel Marjamäki c02b39a3ba Use manual.css in manual 2020-07-15 21:57:49 +02:00
Simon Large dac72beb9e manual: add css style sheet 2020-07-15 21:56:27 +02:00
Simon Large a23d1ca692 manual.md: Reformatting lists 2020-07-15 21:49:25 +02:00
Daniel Marjamäki 57187ef876 ImportProject: Read max template recursion configuration value 2020-06-27 10:34:02 +02:00
Daniel Marjamäki 98bf0d41aa TemplateSimplifier; Clarify information message when max recursion limit is reached 2020-06-26 12:59:40 +02:00
Daniel Marjamäki d0b2ddc056 Manual; Tweaked section about template recursion 2020-06-26 12:39:55 +02:00
Daniel Marjamäki c21b5b1aa4 manual; template recursion 2020-06-24 20:47:12 +02:00
Daniel Marjamäki fdb8cbdb8c manual; extend description of --std 2020-06-22 20:10:03 +02:00
orbitcowboy 86e64f6224 Integrated PR #2679 into main 2020-06-15 20:11:20 +02:00
Daniel Marjamäki 33388217a5 new default branch is main 2020-06-15 20:04:57 +02:00
Daniel Marjamäki dc5e93a103 manual: preprocessor configuration, platform, standard 2020-06-14 17:40:34 +02:00
Daniel Marjamäki 97fd51edd1 Set version to 2.1.99 / 2.2 dev 2020-06-14 07:16:14 +02:00
Daniel Marjamäki 026bbac975 2.1: Set version 2020-06-13 17:04:26 +02:00
Daniel Marjamäki dc32f428ff Set Cppcheck version 2020-05-10 11:28:31 +02:00
Daniel Marjamäki 296a0adc97 man/reference-cfg-format.md: Update text about <not-uninit/>. When 'indirect' the indirection will be implicit according to our old rules. 2020-05-09 09:24:44 +02:00
Daniel Marjamäki 2c23a81470 Manual: Improved information about bug hunting 2020-05-08 22:47:27 +02:00
Daniel Marjamäki 32cbbb09ed cli: publish the --clang option 2020-05-08 20:52:42 +02:00
Daniel Marjamäki e329169ce5 documentation 2020-05-08 20:15:54 +02:00
Daniel Marjamäki 6f1df50511 Manual: minor tweaks of 'bug hunting' chapter 2020-05-03 17:42:43 +02:00
Daniel Marjamäki 1c6b6dc384 Manual; In bug hunting chapter focus on GUI usage better 2020-04-29 22:27:34 +02:00
Daniel Marjamäki c60652630f manual: cleaned up chapter about bug hunting 2020-04-21 08:39:23 +02:00
Daniel Marjamäki 86b707607c manual: describe bug hunting better 2020-04-20 10:40:39 +02:00
Lukas Grützmacher 095fd2bc62
add command line option to select single project configuration of loaded solution (#2523)
* add command line option to select single project configuration of loaded solution

* Update cmdlineparser.cpp

* Update manual.md

* fix initialization
2020-04-19 18:19:28 +02:00
Daniel Marjamäki 7f2f7031e1 manual: updated chapter about inline suppressions 2020-02-25 19:59:21 +01:00
fuzzelhjb fcd5cda97f Check selected files from project (#2378) 2020-01-10 08:57:37 +01:00
Daniel Marjamäki bf62138237 Verification; Remove VERIFY_UNINIT define, the checking is always compiled from now on 2020-01-09 20:25:52 +01:00
Daniel Marjamäki 9b48802a7f Verification; Updated manual 2020-01-01 11:31:10 +01:00
Daniel Marjamäki c6dfec5d5f Verification; Describe our philosophy in the manual 2020-01-01 09:39:57 +01:00
Daniel Marjamäki c86a2d6e15 Verification; updated manual 2019-12-31 14:03:12 +01:00
Daniel Marjamäki 270140f1fa manual; add chapter about verification 2019-12-23 16:34:50 +01:00
Daniel Marjamäki 267bdc0f5f Manual: -i and --project 2019-12-14 13:05:05 +01:00
Armin Müller 130ebe4b85 Typos found by running "codespell" (#2380) 2019-11-19 20:02:24 +01:00
Daniel Marjamäki 65784a16c4 Manual: Clarify suppression filename, it must match exactly (#7780) 2019-11-17 17:18:41 +01:00
Daniel Marjamäki f5e3dc9a38 Improved fix for #8978 (False positive: Variable assigned value that is never used when assigning via iterator) 2019-11-17 12:08:21 +01:00
Paul Fultz II 4ebf54d090 Fix issue 9437: Dont assume init list constructor for strings (#2366)
* Fix issue 9437: Dont assume init list constuctor for strings

* Update the schema

* Add documentation
2019-11-17 03:22:04 +01:00
Sebastian b089ba4e3b
manuals: Fix missing/wrong table of contents in HTML files (#2360)
The YAML setting `toc: true` works for PDF creation but for HTML it
simply prints `true` as the table of contents.
It looks like a misconception and the only acceptable solution I have
found is to use `--toc` on the command line instead of the `toc: true`
setting in the YAML header.
It is a known issue, here are more details:
https://github.com/jgm/pandoc/issues/2872
With this fix I get table of contents not only for PDF but for HTML too.
The PDF looks like before for me, the table of contents and the outline
are still present as it was before.
2019-11-15 21:35:41 +01:00
Georgy Komarov 3bd126486f addons: Clean up and clarify addons usage. (#2359)
* addons: Add '--recursive' arg. Clean up and clarify errors messages.

This commit introduce '--recursive' option for cppcheck addons.
Iff this option is set addon will recursively traverse directories in
given input files to find files with '.dump' suffix that would be
checked. Otherwise it will treat input directory as error (current
behaviour).

Add additional error handling with more clear error messages, clean up
the code.

* Add regex specifier

* Roll back --recursive option

* Update addons section in manual
2019-11-15 20:14:30 +01:00
Paul Fultz II 7841430793 Fix issue 9428: FP uninitvar for pointer passed to sscanf (#2344)
* Add indirect to library cfg files

* Check indirect for non null arguments

* Reenable subfunction analysis

* Use indirect 1 when using not-null

* Parse correct string name

* Update documentation

* Make attribute optional
2019-11-13 12:46:54 +01:00
Masafumi Koba 38dec6a9ac Add missing ending tag in XML example (#2187) 2019-09-20 16:46:57 +02:00
Daniel Marjamäki 346a19393f removed manual.docbook 2019-09-12 20:48:20 +02:00
PKEuS e9f8dddabe Set version to 1.89.99/1.90 dev 2019-09-02 15:44:40 +02:00
Daniel Marjamäki 4ede39a9b7 1.89: Set version 2019-09-01 12:16:33 +02:00
Daniel Marjamäki 767667815d Manual: Remove chapter about safe checks again. I hide this for now. 2019-08-25 18:44:59 +02:00
Daniel Marjamäki 7367b212ae Manual: Add chapter about safe checks 2019-08-25 16:16:35 +02:00
Wolfgang Stöggl 1c32455ae1 Fix some typos (#1983) 2019-07-12 17:55:44 +02:00
Rikard Falkeborn 839fcddd8a Fix #6115 (Add support to realloc to cfg files) (#1953)
* Allow to configure realloc like functions

* memleakonrealloc: Bring back tests.

The old memleak checker was removed, and the tests for it was removed in
commit 9765a2dfab. This also removed the
tests for memleakOnRealloc. Bring back those tests, somewhat modified
since the checker no longer checks for memory leaks.

* Add realloc to mem leak check

* Add tests of realloc buffer size

* Configure realloc functions

* Add test of freopen

* Allow to configure which element is realloc argument

* Fix wrong close in test

cppcheck now warns for this

* Update manual

* Update docs

* Rename alloc/dalloc/realloc functions

Naming the member function realloc caused problems on appveyor. Rename
the alloc and dealloc functions as well for consistency.

* Change comparisson order

* Remove variable and use function call directly

* Create temporary variable to simplify

* Throw mismatchError on mismatching allocation/reallocation

* Refactor to separate function

* Fix potential nullptr dereference

As pointed out by cppcheck.
2019-07-05 12:44:52 +02:00
PKEuS d74f8c678f Set version to 1.88.99/1.89 dev 2019-07-02 20:59:52 +02:00
Daniel Marjamäki faaabc74a7 Set version 1.88 2019-06-29 08:38:13 +02:00
Daniel Marjamäki 325af2399b man: document the <smart-pointer> element 2019-06-28 17:15:53 +02:00
Daniel Marjamäki 481d94f059 reference-cfg-format: Document the direction attribute 2019-06-28 15:18:00 +02:00
Daniel Marjamäki 89a45c8f8a Manual: The Cppcheck GUI has some options that can be 'imported' on the command line 2019-06-16 12:37:18 +02:00
Daniel Marjamäki 167950c8e7 Manual: Move .cfg reference to its own document 2019-06-16 10:08:37 +02:00
Daniel Marjamäki 22ed912e47 manual: trim the manual somewhat. The "speeding up Cppcheck" chapter was removed. Addons should not be described in detail in the manual it is better that this is done in the addon. 2019-06-16 08:22:24 +02:00
Daniel Marjamäki 5301c44374 man: comment 2019-06-05 10:47:06 +02:00
Daniel Marjamäki 350b43c6ba Manual: Cleanup, update build script 2019-06-02 11:33:21 +02:00
Daniel Marjamäki c130208d9d Manual: fixes 2019-06-02 11:28:50 +02:00
Daniel Marjamäki 9e457b6136 Manual: Building html/pdf manuals 2019-06-01 19:52:09 +02:00
Paul Fultz II 091f4bcf8d Add check for unnecessary search before insertion
This will warn for cases where searching in an associative container happens before insertion, like this:

```cpp
void f1(std::set<unsigned>& s, unsigned x) {
    if (s.find(x) == s.end()) {
        s.insert(x);
    }
}

void f2(std::map<unsigned, unsigned>& m, unsigned x) {
    if (m.find(x) == m.end()) {
        m.emplace(x, 1);
    } else {
        m[x] = 1;
    }
}
```

In the case of the map it could be written as `m[x] = 1` as it will create the key if it doesnt exist, so the extra search is not necessary.

I have this marked as `performance` as it is mostly concerning performance, but there could be a copy-paste error possibly, although I dont think thats common.
2019-05-02 11:04:23 +02:00
Daniel Marjamäki 1f68e038be Addons: Describe running addons from cppcheck in the manual 2019-04-08 21:31:38 +02:00
Sebastian b62a7fe059 manual.md: Spelling fixes (#1791)
Thanks!
2019-04-08 16:03:43 +02:00
Sebastian d8d4ca51d7
manual.md: Fix markdown lint warnings. (#1773) 2019-04-03 20:05:04 +02:00
versat 5fb23a4983 manual.md: Fix wrong code indentation. 2019-04-01 13:30:24 +02:00
versat 1c24a14f3f manual.md: Fixed missing back ticks and spaces.
When not between back ticks everything between angle brackets is
interpreted as HTML tags and not rendered.
Also fixed missing spaces after a sentence and in a code block.
2019-04-01 09:29:05 +02:00
Daniel Marjamäki 475036c4bc manual.md: describe library configuration 2019-03-17 10:28:53 +01:00
Daniel Marjamäki 5461fb64e3 manual.md: replace __MSCVER with _MSC_VER, that is more correct 2019-03-11 18:21:17 +01:00
Daniel Marjamäki 7fd34ac8a2 Manual: Add chapter about speeding up Cppcheck analysis 2019-03-11 13:11:17 +01:00
Daniel Marjamäki 996916358a manual.md: minor tweaks 2019-03-04 20:44:57 +01:00
Daniel Marjamäki f77754ba3b manual.md: Improved 'Get started' chapter. Add 'HTML Report' chapter 2019-03-04 20:33:13 +01:00
versat 973ccda733 manual.md: Copy and adapt chapter "Using your own custom .cfg file". 2019-03-04 16:11:42 +01:00
Daniel Marjamäki 97dc19b9b1 manual.md: imported info from manual.docbook 2019-03-03 17:31:02 +01:00
Daniel Marjamäki 5e85a3df6c manual.md: Add a 'Getting started' chapter 2019-03-02 14:33:14 +01:00
Daniel Marjamäki caaa4c0b98 manual.md: Add new manual file. 2019-03-02 10:08:09 +01:00
Andreas Rönnquist be6cec5ad8 Fix link to cppcheck wiki in man page (#1714) 2019-02-28 20:37:49 +01:00
PKEuS 11daabc1a8 Set version to 1.87.99/1.88 dev 2019-02-27 21:30:54 +01:00
fu7mu4 c78de5cdb5 change version number on manual-ja.docbook (#1658) 2019-02-10 16:57:48 +01:00
Daniel Marjamäki 502d5e9142 1.87: Set versions 2019-02-09 09:07:27 +01:00
Daniel Marjamäki 437800f46d CLI: Added --max-ctu-depth 2019-02-03 17:51:36 +01:00
Crayon d54017a0c4 Correct documentation and give an example (#1594) 2019-01-12 08:06:31 +01:00
Daniel Marjamäki dd62da02e4 manual: Try to clarify <podtype> documentation 2019-01-06 11:15:06 +01:00
fu7mu4 2abb3aa263 fix japanese translation typo and manual version (#1515) 2018-12-09 09:06:56 +01:00
PKEuS 886aa07ffb Set version to 1.86.99/1.87 dev 2018-12-08 11:53:37 +01:00
Daniel Marjamäki 5e527bdd08 Update version 2018-12-08 08:17:05 +01:00
fu7mu4 f3b127032a fix newline from backslash t to backslash n in manual-ja.docbook (#1443) 2018-10-21 07:05:15 +02:00
fu7mu4 ab985f624c update manual-ja.docbook (#1441) 2018-10-20 19:49:43 +02:00
fu7mu4 fdc6de2d52 fix typp on manual.docbook Newline is \n instead of \t (#1442) 2018-10-20 19:49:27 +02:00
rikardfalkeborn 613dc19b68 #4241: Check for address of single character passed as string (#1381)
* #4241: Check for address of single character passed as string

Add a check that address of a single character is not passed as argument
to argument marked as strings (using strz). The check does not warn if
the address of a character with known value '\0'.

Since ValueFlow currently does not handle global constants (see #7597),
do not warn if the variable is global to avoid FPs when the address of
a global variable assigned to '\0' is passed to a function expecting a
string.

Remove comment in docs saying strz is unused.

* Change asdf to Hello world

* Add test of address to first element in string

* Add error reporting function to getErrorMessages

* Fix strings in test
2018-10-14 18:49:34 +02:00
Daniel Marjamäki 895772711a 1.85: Set version 2018-10-13 18:55:19 +02:00
Daniel Marjamäki 140b0b5ae9 astyle formatting
[ci skip]
2018-10-13 18:42:09 +02:00
Jes Ramsing 5328caa6fa Added documentation for --suppress-xml (#1420)
* Added documentation for --suppress-xml

* Bad copy place job "--suppress-xml" not "--suppressions-list"

* Fixed indentation to use . instead of tab
2018-10-13 18:41:12 +02:00
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
PKEuS 009287f912 Set version to 1.84.99/1.85 dev 2018-06-25 21:03:43 +02:00
Daniel Marjamäki a21c05edfe 1.84: Set versions
[ci skip]
2018-06-10 22:21:57 +02:00
Matthias Krüger 4c8bb9ac6f fix a few typos 2018-05-14 13:11:59 +02:00
Daniel Marjamäki 74b1d1deb6 manual: updated documentation for --template and --template-location 2018-04-23 13:38:15 +02:00
Daniel Marjamäki 7176632bc6 manual: Document suppressions 2018-04-11 12:50:02 +02:00
PKEuS 32a2060f14 Set version to 1.83.99/1.84 dev
Updated copyright year in version.h
2018-04-02 15:21:37 +02:00
Daniel Marjamäki b4924e59da manual: updated MISRA chapter. The rule texts cant be extracted directly from the PDF anymore. 2018-04-01 22:57:04 +02:00
Daniel Marjamäki 7260be81a6 Update version 2018-03-31 21:25:29 +02:00