Skip to content

Commit eb70f6d

Browse files
committed
Fix format, rendering, typos, syntax in the readme
1 parent 69d89c5 commit eb70f6d

File tree

1 file changed

+53
-52
lines changed

1 file changed

+53
-52
lines changed

readme.md

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# **Cppcheck**
1+
# **Cppcheck**
22

33
|release-windows|OSS-Fuzz|Coverity Scan Build Status|include-what-you-use|License|
44
|:--:|:--:|:--:|:--:|:--:|
5-
|[![release-windows](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml/badge.svg?branch=main)](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml)|[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/cppcheck.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:cppcheck)|[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/512.svg)](https://scan.coverity.com/projects/512)|[![include-what-you-use](https://github.com/danmar/cppcheck/actions/workflows/iwyu.yml/badge.svg?branch=main)](https://github.com/danmar/cppcheck/actions/workflows/iwyu.yml)|[![License](https://img.shields.io/badge/license-GPL3.0-blue.svg)](https://opensource.org/licenses/GPL-3.0)
6-
5+
|[![release-windows](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml/badge.svg?branch=main)](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml)|[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/cppcheck.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:cppcheck)|[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/512.svg)](https://scan.coverity.com/projects/512)|[![include-what-you-use](https://github.com/danmar/cppcheck/actions/workflows/iwyu.yml/badge.svg?branch=main)](https://github.com/danmar/cppcheck/actions/workflows/iwyu.yml)|[![License](https://img.shields.io/badge/license-GPL3.0-blue.svg)](https://opensource.org/licenses/GPL-3.0)|
76

87
## About the name
98

@@ -21,7 +20,8 @@ Cppcheck is a hobby project with limited resources. You can help us by donating
2120

2221
1. Download (and extract) Cppcheck source code.
2322
2. Run (Linux/MacOS example):
24-
```
23+
24+
```shell
2525
cd cppcheck/
2626
python3 -m venv .venv
2727
source .venv/bin/activate
@@ -30,9 +30,9 @@ Cppcheck is a hobby project with limited resources. You can help us by donating
3030
./tools/donate-cpu.py
3131
```
3232

33-
The script will analyse debian source code and upload the results to a cppcheck server. We need these results both to improve Cppcheck and to detect regressions.
33+
The script will analyse debian source code and upload the results to a Cppcheck server. We need these results both to improve Cppcheck and to detect regressions.
3434

35-
You can stop the script whenever you like with Ctrl C.
35+
You can stop the script whenever you like with Ctrl+C.
3636

3737
## Compiling
3838

@@ -43,6 +43,7 @@ To build the GUI application, you need to use the CMake build system.
4343
When building the command line tool, [PCRE](http://www.pcre.org/) is optional. It is used if you build with rules.
4444

4545
There are multiple compilation choices:
46+
4647
* CMake - cross platform build tool
4748
* (Windows) Visual Studio
4849
* (Windows) Qt Creator + MinGW
@@ -62,22 +63,22 @@ cmake --build build
6263
```
6364

6465
If you want to compile the GUI you can use the flag.
65-
-DBUILD_GUI=ON
66+
`-DBUILD_GUI=ON`
6667

6768
For rules support (requires pcre) use the flag.
68-
-DHAVE_RULES=ON
69+
`-DHAVE_RULES=ON`
6970

7071
For release builds it is recommended that you use:
71-
-DUSE_MATCHCOMPILER=ON
72+
`-DUSE_MATCHCOMPILER=ON`
7273

7374
For building the tests use the flag.
74-
-DBUILD_TESTING=ON
75+
`-DBUILD_TESTING=ON`
7576

76-
Using cmake you can generate project files for Visual Studio,XCode,etc.
77+
Using CMake you can generate project files for Visual Studio, XCode, etc.
7778

7879
#### Building a specific configuration
7980

80-
For single-configuration generators (like "Unix Makefiles") you can generate and build a specific configuration (e.g. "RelWithDebInfo") using:
81+
For single-configuration generators (like "Unix Makefiles") you can generate and build a specific configuration (e.g. "`RelWithDebInfo`") using:
8182

8283
```shell
8384
cmake -S . -B build_RelWithDebInfo -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
@@ -93,24 +94,24 @@ cmake --build build --config RelWithDebInfo
9394

9495
### Visual Studio
9596

96-
Use the cppcheck.sln file. The file is configured for Visual Studio 2019, but the platform toolset can be changed easily to older or newer versions. The solution contains platform targets for both x86 and x64.
97+
Use the `cppcheck.sln` file. The file is configured for Visual Studio 2019, but the platform toolset can be changed easily to older or newer versions. The solution contains platform targets for both x86 and x64.
9798

98-
To compile with rules, select "Release-PCRE" or "Debug-PCRE" configuration. pcre.lib (pcre64.lib for x64 builds) and pcre.h are expected to be in /externals then. A current version of PCRE for Visual Studio can be obtained using [vcpkg](https://github.com/microsoft/vcpkg).
99+
To compile with rules, select "`Release-PCRE`" or "`Debug-PCRE`" configuration. `pcre.lib` (`pcre64.lib` for x64 builds) and `pcre.h` are expected to be in `/externals` then. A current version of PCRE for Visual Studio can be obtained using [vcpkg](https://github.com/microsoft/vcpkg).
99100

100101
### Visual Studio (from command line)
101102

102-
If you do not wish to use the Visual Studio IDE, you can compile cppcheck from the command line the following command.
103+
If you do not wish to use the Visual Studio IDE, you can compile Cppcheck from the command line the following command.
103104

104105
```shell
105106
msbuild cppcheck.sln
106107
```
107108

108109
### VS Code (on Windows)
109110

110-
Install MSYS2 to get GNU toolchain with g++ and gdb (https://www.msys2.org/).
111-
Create a settings.json file in the .vscode folder with the following content (adjust path as necessary):
111+
Install MSYS2 to get GNU toolchain with g++ and gdb (<https://www.msys2.org/>).
112+
Create a `settings.json` file in the `.vscode` folder with the following content (adjust path as necessary):
112113

113-
```
114+
```json
114115
{
115116
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
116117
"terminal.integrated.shellArgs.windows": [
@@ -123,11 +124,11 @@ Create a settings.json file in the .vscode folder with the following content (ad
123124
}
124125
```
125126

126-
Run "make" in the terminal to build cppcheck.
127+
Run `make` in the terminal to build Cppcheck.
127128

128-
For debugging create a launch.json file in the .vscode folder with the following content, which covers configuration for debugging cppcheck and misra.py:
129+
For debugging create a `launch.json` file in the `.vscode` folder with the following content, which covers configuration for debugging Cppcheck and `misra.py`:
129130

130-
```
131+
```json
131132
{
132133
// Use IntelliSense to learn about possible attributes.
133134
// Hover to view descriptions of existing attributes.
@@ -174,7 +175,7 @@ For debugging create a launch.json file in the .vscode folder with the following
174175
### Qt Creator + MinGW
175176

176177
The PCRE dll is needed to build the CLI. It can be downloaded here:
177-
http://software-download.name/pcre-library-windows/
178+
<http://software-download.name/pcre-library-windows/>
178179

179180
### GNU compilers
180181

@@ -204,22 +205,22 @@ g++ -o cppcheck -std=c++11 -Iexternals -Iexternals/simplecpp -Iexternals/tinyxml
204205

205206
#### Flags
206207

207-
- `MATCHCOMPILER=yes`
208+
* `MATCHCOMPILER=yes`
208209
Several `Token` matching patterns are converted into more efficient C++ code at compile time (requires Python to be installed).
209210

210-
- `FILESDIR=/usr/share/cppcheck`
211-
Specifies the folder where cppcheck files (addons, cfg, platform) are installed to.
211+
* `FILESDIR=/usr/share/cppcheck`
212+
Specifies the folder where Cppcheck files (addons, cfg, platform) are installed to.
212213

213-
- `HAVE_RULES=yes`
214+
* `HAVE_RULES=yes`
214215
Enables rules (requires PCRE to be installed).
215216

216-
- `CXXOPTS="-O2"`
217+
* `CXXOPTS="-O2"`
217218
Enables most compiler optimizations.
218219

219-
- `CPPOPTS="-DNDEBUG"`
220+
* `CPPOPTS="-DNDEBUG"`
220221
Disables assertions.
221222

222-
- `HAVE_BOOST=yes`
223+
* `HAVE_BOOST=yes`
223224
Enables usage of more efficient container from Boost (requires Boost to be installed).
224225

225226
### MinGW
@@ -230,18 +231,18 @@ mingw32-make
230231

231232
If you encounter the following error with `MATCHCOMPILER=yes` you need to specify your Python interpreter via `PYTHON_INTERPRETER`.
232233

233-
```
234+
```text
234235
process_begin: CreateProcess(NULL, which python3, ...) failed.
235236
makefile:24: pipe: No error
236237
process_begin: CreateProcess(NULL, which python, ...) failed.
237238
makefile:27: pipe: No error
238239
makefile:30: *** Did not find a Python interpreter. Stop.
239240
```
240241

241-
### Other Compiler/IDE
242+
### Other compiler/IDE
242243

243244
1. Create an empty project file / makefile.
244-
2. Add all cpp files in the cppcheck cli and lib folders to the project file / makefile.
245+
2. Add all cpp files in the Cppcheck cli and lib folders to the project file / makefile.
245246
3. Add all cpp files in the externals folders to the project file / makefile.
246247
4. Compile.
247248

@@ -255,41 +256,41 @@ mv cppcheck cppcheck.exe
255256

256257
## Packages
257258

258-
Besides building yourself on the platform of your choice there are also several ways to obtain pre-built packages.<br/>
259+
Besides building yourself on the platform of your choice there are also several ways to obtain pre-built packages.
259260

260261
### Official
261262

262263
Official packages are maintained by the Cppcheck team.
263264

264-
- (Windows) An official Windows installer is available via the official Cppcheck SourceForge page: https://cppcheck.sourceforge.io.
265-
- (Windows) Official builds of the current development versions are available via the [release-windows](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml) workflow. They are built nightly for the `main` branch and for each commit for release branches. As these are development versions please refrain from using these in production environments!
266-
- A portable package (i.e. does not require installation) is available as the `portable` artifact. This is still a work-in-progress - see https://trac.cppcheck.net/ticket/10771 for details.
267-
- An installer is available via the `installer` artifact.
268-
- (Multi-Platform) A premium version with additional features provided by the original author of Cppcheck is available for purchase via https://www.cppcheck.com.
265+
* (Windows) An official Windows installer is available via the official Cppcheck SourceForge page: <https://cppcheck.sourceforge.io>.
266+
* (Windows) Official builds of the current development versions are available via the [release-windows](https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml) workflow. They are built nightly for the `main` branch and for each commit for release branches. As these are development versions please refrain from using these in production environments!
267+
* A portable package (i.e. does not require installation) is available as the `portable` artifact. This is still a work-in-progress - see <https://trac.cppcheck.net/ticket/10771> for details.
268+
* An installer is available via the `installer` artifact.
269+
* (Multi-Platform) A premium version with additional features provided by the original author of Cppcheck is available for purchase via <https://www.cppcheck.com>.
269270

270271
### Third-party
271272

272273
Third-party packages are ***not*** maintained by the Cppcheck team but their respective packagers.
273274

274275
*Note:* The following list is purely informational and listed in no particular order.
275276

276-
*Note:* Please always try to obtain the package from the primary official source of your operating system/distro first and make sure you are getting the latest released/tagged version (see https://github.com/danmar/cppcheck/tags). Some packages might not carry the latest patch version though.
277+
*Note:* Please always try to obtain the package from the primary official source of your operating system/distro first and make sure you are getting the latest released/tagged version (see <https://github.com/danmar/cppcheck/tags>). Some packages might not carry the latest patch version though.
277278

278279
*Note:* Some issues might be related to additional patches carried by the builds in these packages or by the packaging itself. Please try to verify the issue with an official build before reporting it upstream. Otherwise you might need toreport it to the respective maintainer of the package.
279280

280-
- (Windows / Outdated) A portable package is available via https://portableapps.com/apps/development/cppcheck-portable.
281-
- (Windows / Outdated) A package is available via https://community.chocolatey.org/packages/cppcheck.
282-
- (Windows / Outdated) A package is available via https://winget.run/pkg/Cppcheck/Cppcheck.
283-
- (Windows) A package is available via https://scoop.sh/#/apps?q=cppcheck.
284-
- (Linux/Unix) Many major distros offer Cppcheck packages via their integrated package managers (`yum`, `apt`, `pacman`, etc.). See https://pkgs.org/search/?q=cppcheck or https://repology.org/project/cppcheck for an overview.
285-
- (Linux/Unix) Unless you are using a "rolling" distro, it is likely that they are not carrying the latest version. There are several external (mainly unsupported) repositories like AUR (ArchLinux), PPA (ubuntu), EPEL (CentOS/Fedora) etc. which might provide up-to-date packages.
286-
- (Linux/Unix / Outdated) The Canonical Snapcraft packages (https://snapcraft.io/cppcheck / https://snapcraft.io/cppcheckgui) are unmaintained and contain very old (development) versions. Please refrain from using them! See https://trac.cppcheck.net/ticket/11641 for more details.
287-
- (MacOS) A package is available via Homebrew (`brew`). See https://formulae.brew.sh/formula/cppcheck.
288-
- (MacOS) A package is available via https://ports.macports.org/port/cppcheck.
289-
- (Multi-Platform) A package is available via https://anaconda.org/conda-forge/cppcheck.
290-
- (Multi-Platform) A package is available via https://conan.io/center/recipes/cppcheck.
291-
- Packages are also available from various download portals (mainly the Windows installer - sometimes re-packaged).
281+
* (Windows / Outdated) A portable package is available via <https://portableapps.com/apps/development/cppcheck-portable>.
282+
* (Windows / Outdated) A package is available via <https://community.chocolatey.org/packages/cppcheck>.
283+
* (Windows / Outdated) A package is available via <https://winget.run/pkg/Cppcheck/Cppcheck>.
284+
* (Windows) A package is available via <https://scoop.sh/#/apps?q=cppcheck>.
285+
* (Linux/Unix) Many major distros offer Cppcheck packages via their integrated package managers (`yum`, `apt`, `pacman`, etc.). See <https://pkgs.org/search/?q=cppcheck> or <https://repology.org/project/cppcheck> for an overview.
286+
* (Linux/Unix) Unless you are using a "rolling" distro, it is likely that they are not carrying the latest version. There are several external (mainly unsupported) repositories like AUR (ArchLinux), PPA (Ubuntu), EPEL (CentOS/Fedora) etc. which might provide up-to-date packages.
287+
* (Linux/Unix / Outdated) The Canonical Snapcraft packages (<https://snapcraft.io/cppcheck> / <https://snapcraft.io/cppcheckgui>) are unmaintained and contain very old (development) versions. Please refrain from using them! See <https://trac.cppcheck.net/ticket/11641> for more details.
288+
* (MacOS) A package is available via Homebrew (`brew`). See <https://formulae.brew.sh/formula/cppcheck>.
289+
* (MacOS) A package is available via <https://ports.macports.org/port/cppcheck>.
290+
* (Multi-Platform) A package is available via <https://anaconda.org/conda-forge/cppcheck>.
291+
* (Multi-Platform) A package is available via <https://conan.io/center/recipes/cppcheck>.
292+
* Packages are also available from various download portals (mainly the Windows installer - sometimes re-packaged).
292293

293294
## Webpage
294295

295-
https://cppcheck.sourceforge.io/
296+
<https://cppcheck.sourceforge.io/>

0 commit comments

Comments
 (0)