Commit Graph

440 Commits

Author SHA1 Message Date
Daniel Marjamäki afb46e6cff Manual; Attempt to clarify section about automatic preprocessor defines configuration 2021-02-06 13:35:12 +01:00
Daniel Marjamäki a30c28550b Manual; Try to clarify how automatic configuration works 2021-02-06 11:48:08 +01:00
Oliver Stöneberg f46a9e3543
fixed/excluded some shellcheck warnings and actually fail the build when something is found (#3068) 2021-01-20 18:43:49 +01:00
Daniel Marjamäki 2a1e230d2e 2.3: Update version 2020-12-05 10:00:02 +01:00
Daniel Marjamäki 96e3c0a9e0 Manual; Improved text about misra 2020-12-02 08:31:45 +01:00
Daniel Marjamäki a05a20093a manual; tweaked introduction 2020-11-25 17:48:17 +01:00
longradix e96948cdd9
documentation updates (#2906) 2020-11-25 16:56:24 +01:00
Daniel Marjamäki 2e20ee9e39 set version 2.2.99 2020-10-03 13:54:17 +02:00
Daniel Marjamäki c373be0b16 2.2: Update versions 2020-10-03 10:47:35 +02:00
Daniel Marjamäki 7ff6d691e2 Manual: Clarify section about inline suppressions. For backwards compatibility we might need to handle a comment after a '{' differently. 2020-10-02 18:18:30 +02:00
Oliver Stöneberg fb37137216
extended the --clang command-line option so you can specify a custom … (#2734) 2020-09-06 07:46:51 +02:00
Daniel Marjamäki da1de50deb Clang: The clang parser import should be considered to be an experimental feature for now. There are many problems to solve. 2020-09-04 18:30:29 +02:00
Daniel Marjamäki acd1e848dd manual; try to clarify better how variable contracts are used by cppcheck 2020-08-28 19:42:52 +02:00
Daniel Marjamäki 31d7acb99a manual: markdown fix 2020-08-25 18:16:14 +02:00
Daniel Marjamäki 56f1897961 manual: markdown fix 2020-08-25 18:13:18 +02:00
Daniel Marjamäki 3226fd85ee manual: Updated documentation for contracts 2020-08-25 18:10:03 +02:00
Daniel Marjamäki 6277eece67 Variable contracts 2020-08-24 20:57:49 +02:00
eivindt 27e40af06c
Add support for comments at end of suppression in suppression files (#2736) 2020-08-20 21:49:07 +02:00
Daniel Marjamäki 14dfa035c1 GUI: Try to reuse Qt Assistant to show help 2020-08-01 18:56:37 +02:00
Simon Large ec99be0332 Create separate scripts for building HTML and PDF documents
The PDF build command line is getting very long, and it needs another option. Create separate build scripts for HTML and PDF and just pass in the name of the markdown file.

Adds -V subparagraph to fix a LaTeX error.

Adds fallback font selection to the PDF script.
2020-07-24 18:54:06 +01:00
Simon Large 60362ce8cd Add styling to PDF manual
This uses the xelatex engine and a few style settings to make the PDF manual look more like the HTML manual.
2020-07-23 15:39:23 +01:00
Daniel Marjamäki f11a089141 help/manual: update explanations about severities 2020-07-23 16:09:24 +02:00
Daniel Marjamäki 0a84a1fad7 GUI: Add help files that replace the gui-manual.md 2020-07-19 21:40:17 +02:00
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