Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## standard default enconding
* text=auto

## UNIX specific files
*.sh text eol=lf

## Windows specific files
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.sln text eol=crlf
*.wixproj text eol=crlf
*.wxi text eol=crlf
*.wxs text eol=crlf

## Binary resources
*.pdf binary
10 changes: 5 additions & 5 deletions addons/test/naming_test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// To test:
// ~/cppcheck/cppcheck --dump naming_test.c && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump
// Should not crash when there is no name
void func(int number, int);
// To test:
// ~/cppcheck/cppcheck --dump naming_test.c && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump

// Should not crash when there is no name
void func(int number, int);
22 changes: 11 additions & 11 deletions addons/test/naming_test.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// To test:
// ~/cppcheck/cppcheck --dump naming_test.cpp && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump
// No error for mismatching Constructor/Destructor names should be issued, they can not be changed.
class TestClass1
{
TestClass1() {}
~TestClass1() {}
TestClass1(const TestClass1 &) {}
TestClass1(TestClass1 &&) {}
};
// To test:
// ~/cppcheck/cppcheck --dump naming_test.cpp && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump

// No error for mismatching Constructor/Destructor names should be issued, they can not be changed.
class TestClass1
{
TestClass1() {}
~TestClass1() {}
TestClass1(const TestClass1 &) {}
TestClass1(TestClass1 &&) {}
};
152 changes: 76 additions & 76 deletions build-pcre.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
PCRE is a library that is used by the optional "rules" feature for the command
line version of cppcheck. It is readily available on Linux and Mac OS X, but
must be obtained separately for Windows.
If you're using qmake to generate makefiles, the following behavior applies:
- If you're not on Windows, it assumes by default that you have PCRE and want
to enable rules support. You can disable rules support (removing the PCRE
dependency) by passing HAVE_RULES=no to qmake.
- If you are on Windows, but have PCRE available, you can enable rules support
by passing HAVE_RULES=yes to qmake.
- Note: This includes using build.bat since it calls qmake - to use PCRE and
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat
Build instructions
------------------
Windows
-------
Visual Studio
To build PCRE, download the source code from www.pcre.org and
CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 -
otherwise adapt the commands for your version.
VS Solution file
cmake . -G "Visual Studio 14 2015"
Open PCRE.sln with VS IDE or via cmd:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
MSBuild PCRE.sln /target:Build /property:Configuration="Release"
For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64"
or using NMake
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
cmake . -G "NMake Makefiles"
nmake
or using MSYS
cmake . -G "MSYS Makefiles"
make
Linux
-----
The normal Makefile should work.
Install PCRE on Ubuntu might be needed:
sudo apt-get install libpcre3 libpcre3-dev
Mac OSX
-------
Install PCRE:
homebre
brew install pcre
or macport
sudo port install pcre
Ensure /path/to/pcre.h is in CXXFLAGS, e.g:
for homebrew
export CXXFLAGS=${CXXFLAGS}:/usr/local/include
or macport
export CXXFLAGS=${CXXFLAGS}:/opt/local/include
Or for MSVC copy pcre.lib and pcre.h in /externals directory.
PCRE is a library that is used by the optional "rules" feature for the command
line version of cppcheck. It is readily available on Linux and Mac OS X, but
must be obtained separately for Windows.

If you're using qmake to generate makefiles, the following behavior applies:

- If you're not on Windows, it assumes by default that you have PCRE and want
to enable rules support. You can disable rules support (removing the PCRE
dependency) by passing HAVE_RULES=no to qmake.

- If you are on Windows, but have PCRE available, you can enable rules support
by passing HAVE_RULES=yes to qmake.

- Note: This includes using build.bat since it calls qmake - to use PCRE and
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat


Build instructions
------------------

Windows
-------

Visual Studio

To build PCRE, download the source code from www.pcre.org and
CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 -
otherwise adapt the commands for your version.

VS Solution file
cmake . -G "Visual Studio 14 2015"
Open PCRE.sln with VS IDE or via cmd:
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
MSBuild PCRE.sln /target:Build /property:Configuration="Release"

For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64"

or using NMake
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
cmake . -G "NMake Makefiles"
nmake

or using MSYS
cmake . -G "MSYS Makefiles"
make


Linux
-----

The normal Makefile should work.

Install PCRE on Ubuntu might be needed:
sudo apt-get install libpcre3 libpcre3-dev


Mac OSX
-------

Install PCRE:

homebre
brew install pcre

or macport
sudo port install pcre

Ensure /path/to/pcre.h is in CXXFLAGS, e.g:

for homebrew
export CXXFLAGS=${CXXFLAGS}:/usr/local/include

or macport
export CXXFLAGS=${CXXFLAGS}:/opt/local/include

Or for MSVC copy pcre.lib and pcre.h in /externals directory.
Loading