Skip to content

Commit 0c95971

Browse files
authored
added .gitattributes and normalized files (danmar#4668)
1 parent d3a2cdc commit 0c95971

40 files changed

+10602
-10583
lines changed

.gitattributes

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## standard default enconding
2+
* text=auto
3+
4+
## UNIX specific files
5+
*.sh text eol=lf
6+
7+
## Windows specific files
8+
*.bat text eol=crlf
9+
*.cmd text eol=crlf
10+
*.ps1 text eol=crlf
11+
*.vcxproj text eol=crlf
12+
*.vcxproj.filters text eol=crlf
13+
*.sln text eol=crlf
14+
*.wixproj text eol=crlf
15+
*.wxi text eol=crlf
16+
*.wxs text eol=crlf
17+
18+
## Binary resources
19+
*.pdf binary

addons/test/naming_test.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// To test:
2-
// ~/cppcheck/cppcheck --dump naming_test.c && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump
3-
4-
// Should not crash when there is no name
5-
void func(int number, int);
1+
// To test:
2+
// ~/cppcheck/cppcheck --dump naming_test.c && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump
3+
4+
// Should not crash when there is no name
5+
void func(int number, int);

addons/test/naming_test.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// To test:
2-
// ~/cppcheck/cppcheck --dump naming_test.cpp && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump
3-
4-
// No error for mismatching Constructor/Destructor names should be issued, they can not be changed.
5-
class TestClass1
6-
{
7-
TestClass1() {}
8-
~TestClass1() {}
9-
TestClass1(const TestClass1 &) {}
10-
TestClass1(TestClass1 &&) {}
11-
};
1+
// To test:
2+
// ~/cppcheck/cppcheck --dump naming_test.cpp && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump
3+
4+
// No error for mismatching Constructor/Destructor names should be issued, they can not be changed.
5+
class TestClass1
6+
{
7+
TestClass1() {}
8+
~TestClass1() {}
9+
TestClass1(const TestClass1 &) {}
10+
TestClass1(TestClass1 &&) {}
11+
};

build-pcre.txt

+76-76
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
PCRE is a library that is used by the optional "rules" feature for the command
2-
line version of cppcheck. It is readily available on Linux and Mac OS X, but
3-
must be obtained separately for Windows.
4-
5-
If you're using qmake to generate makefiles, the following behavior applies:
6-
7-
- If you're not on Windows, it assumes by default that you have PCRE and want
8-
to enable rules support. You can disable rules support (removing the PCRE
9-
dependency) by passing HAVE_RULES=no to qmake.
10-
11-
- If you are on Windows, but have PCRE available, you can enable rules support
12-
by passing HAVE_RULES=yes to qmake.
13-
14-
- Note: This includes using build.bat since it calls qmake - to use PCRE and
15-
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat
16-
17-
18-
Build instructions
19-
------------------
20-
21-
Windows
22-
-------
23-
24-
Visual Studio
25-
26-
To build PCRE, download the source code from www.pcre.org and
27-
CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 -
28-
otherwise adapt the commands for your version.
29-
30-
VS Solution file
31-
cmake . -G "Visual Studio 14 2015"
32-
Open PCRE.sln with VS IDE or via cmd:
33-
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
34-
MSBuild PCRE.sln /target:Build /property:Configuration="Release"
35-
36-
For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64"
37-
38-
or using NMake
39-
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
40-
cmake . -G "NMake Makefiles"
41-
nmake
42-
43-
or using MSYS
44-
cmake . -G "MSYS Makefiles"
45-
make
46-
47-
48-
Linux
49-
-----
50-
51-
The normal Makefile should work.
52-
53-
Install PCRE on Ubuntu might be needed:
54-
sudo apt-get install libpcre3 libpcre3-dev
55-
56-
57-
Mac OSX
58-
-------
59-
60-
Install PCRE:
61-
62-
homebre
63-
brew install pcre
64-
65-
or macport
66-
sudo port install pcre
67-
68-
Ensure /path/to/pcre.h is in CXXFLAGS, e.g:
69-
70-
for homebrew
71-
export CXXFLAGS=${CXXFLAGS}:/usr/local/include
72-
73-
or macport
74-
export CXXFLAGS=${CXXFLAGS}:/opt/local/include
75-
76-
Or for MSVC copy pcre.lib and pcre.h in /externals directory.
1+
PCRE is a library that is used by the optional "rules" feature for the command
2+
line version of cppcheck. It is readily available on Linux and Mac OS X, but
3+
must be obtained separately for Windows.
4+
5+
If you're using qmake to generate makefiles, the following behavior applies:
6+
7+
- If you're not on Windows, it assumes by default that you have PCRE and want
8+
to enable rules support. You can disable rules support (removing the PCRE
9+
dependency) by passing HAVE_RULES=no to qmake.
10+
11+
- If you are on Windows, but have PCRE available, you can enable rules support
12+
by passing HAVE_RULES=yes to qmake.
13+
14+
- Note: This includes using build.bat since it calls qmake - to use PCRE and
15+
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat
16+
17+
18+
Build instructions
19+
------------------
20+
21+
Windows
22+
-------
23+
24+
Visual Studio
25+
26+
To build PCRE, download the source code from www.pcre.org and
27+
CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 -
28+
otherwise adapt the commands for your version.
29+
30+
VS Solution file
31+
cmake . -G "Visual Studio 14 2015"
32+
Open PCRE.sln with VS IDE or via cmd:
33+
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
34+
MSBuild PCRE.sln /target:Build /property:Configuration="Release"
35+
36+
For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64"
37+
38+
or using NMake
39+
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
40+
cmake . -G "NMake Makefiles"
41+
nmake
42+
43+
or using MSYS
44+
cmake . -G "MSYS Makefiles"
45+
make
46+
47+
48+
Linux
49+
-----
50+
51+
The normal Makefile should work.
52+
53+
Install PCRE on Ubuntu might be needed:
54+
sudo apt-get install libpcre3 libpcre3-dev
55+
56+
57+
Mac OSX
58+
-------
59+
60+
Install PCRE:
61+
62+
homebre
63+
brew install pcre
64+
65+
or macport
66+
sudo port install pcre
67+
68+
Ensure /path/to/pcre.h is in CXXFLAGS, e.g:
69+
70+
for homebrew
71+
export CXXFLAGS=${CXXFLAGS}:/usr/local/include
72+
73+
or macport
74+
export CXXFLAGS=${CXXFLAGS}:/opt/local/include
75+
76+
Or for MSVC copy pcre.lib and pcre.h in /externals directory.

0 commit comments

Comments
 (0)