Commit Graph

749 Commits

Author SHA1 Message Date
Daniel Marjamäki 5e527bdd08 Update version 2018-12-08 08:17:05 +01:00
amai2012 52d042fd48 Correct file size calculation 2018-11-30 23:18:51 +01:00
Daniel Marjamäki 895772711a 1.85: Set version 2018-10-13 18:55:19 +02:00
IOBYTE 24f2e288d5 Make --debug alias --debug-normal for backwards compatibility. (#1414) 2018-10-09 14:47:50 +02:00
orbitcowboy 361ae311f6 cmdlineparser: Stop processing in case an invalid path for --includes-file=<PATH> and --config-excludes-file=<PATH> is provided. 2018-09-04 16:37:43 +02:00
Kamil Dudka 0ca6ab1a71 ErrorLogger: add {cwe} (#1341) 2018-08-21 13:58:19 +02:00
Daniel Marjamäki 19af19b15e doxygen: Updated documentation shown on main page 2018-08-18 17:36:40 +02:00
Daniel Marjamäki 67e9a9cb25 naming convention conformance 2018-08-18 15:52:18 +02:00
Daniel Marjamäki 5ebfa035aa Updated variable names according to naming convention 2018-08-18 15:45:42 +02:00
Daniel Marjamäki ddbe4b89b5 Renamed --debug to --debug-simplified 2018-08-05 11:19:20 +02:00
firewave 01ceb9bae7 fixed issue 8661: Misleading error message when compilation database is not recognized 2018-07-25 16:26:25 +02:00
orbitcowboy f27baf0956 cli: stop processing in case an invalid or non-existant rule-file is provided. 2018-07-25 08:25:18 +02:00
Olivier Croquette b05ae44edb Fix link error when building with MinGW about __imp_PathFileExistsA (#1310)
Following error occurs when building with MinGW 7.2.0 and Ninja on Windows:

  cli/CMakeFiles/cli_objs.dir/filelister.cpp.obj: In function `MyIsDirectory':
  cppcheck-1.84\build/../cli/filelister.cpp:49: undefined reference to `__imp_PathIsDirectoryA'
  cli/CMakeFiles/cli_objs.dir/filelister.cpp.obj: In function `MyFileExists':
  cppcheck-1.84\build/../cli/filelister.cpp:67: undefined reference to `__imp_PathFileExistsA'
  collect2.exe: error: ld returned 1 exit status

This is the corresponding code in filelister.cpp:

  #ifdef _WIN32

  // snip

  static BOOL MyIsDirectory(const std::string& path)
  {
  #ifdef __BORLANDC__
      return (GetFileAttributes(path.c_str()) & FILE_ATTRIBUTE_DIRECTORY);
  #else
  // See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx
      return PathIsDirectoryA(path.c_str());
  #endif
  }

  static BOOL MyFileExists(const std::string& path)
  {
  #ifdef __BORLANDC__
      DWORD fa = GetFileAttributes(path.c_str());
      BOOL result = FALSE;
      if (fa != INVALID_FILE_ATTRIBUTES && !(fa & FILE_ATTRIBUTE_DIRECTORY))
	  result = TRUE;
  #else
      const BOOL result = PathFileExistsA(path.c_str());
  #endif
      return result;
  }

The else blocks assume that Shlwapi.lib is available on Windows except with Borland,
so the patch set ensures that the library is linked on the same condition.
2018-07-15 22:26:02 +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
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
bwoester 9b28499412 Import BCB6 projects (#1245)
* added support for reading borland c++ builder 6 projects

* add: fetch sysdefines from project
add: start providing bcb6 predefines (WIP)

* configure all the internal defines for BCB6

* make sure define strings don't start with ';'

* improvements on bwoesters BCB6 project support

- improved `*.bpr` XML handling by reducing the number of loops
- added `const` where aplicable
- optimized compiler argument parser performance
- reformatted code with provided astyle config

* - undo looping (keep it the same as the other implementations)
- keep parsing of cflags simple and separate from the synonym cleanup (no need for micro optimization in this place)
- move input validation to FileSettings::setDefines
- re-run astyle

* use [] instead of at() when comparing characters
2018-05-20 18:19:20 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki cdf7ea0a33 daca2: remove {code} in results 2018-04-24 16:16:45 +02:00
Daniel Marjamäki cf4367d013 daca2: remove 'inconclusive' keyword 2018-04-24 11:06:25 +02:00
Daniel Marjamäki 7c5058a42d Refactoring. Rename methods 2018-04-23 12:39:47 +02:00
Daniel Marjamäki f058d9ad08 CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
PKEuS b596b0d549 Refactorization: pass std::string directly to std::*fstream 2018-04-11 09:50:42 +02:00
PKEuS d2146844dd Refactorizations:
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +02:00
Daniel Marjamäki a0906140a6 Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName. 2018-04-09 06:43:48 +02:00
PKEuS a5162e26e8 Set minimum required compilers to GCC 4.6 or Visual Studio 2013 to support more C++11 features. Use VS 2013 and VS 2017 in AppVeyor. 2018-04-08 23:03:57 +02:00
PKEuS e2002db78d Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
jrp2014 c2e54fa87f Refactor cli/cppcheckexecutor.cpp 2018-04-05 08:12:15 +02:00
jrp2014 b813a6d407 Refactoring 2018-04-04 21:11:23 +02:00
jrp2014 07b5afcdc6 Improve constness 2018-04-04 21:02:13 +02:00
amai dab99e83cd (Re-)Enable exception handling on cygwin 2018-04-03 00:41:13 +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 7260be81a6 Update version 2018-03-31 21:25:29 +02:00
Daniel Marjamäki 7e4dba6a7e Updated copyright year 2018-03-31 20:59:09 +02:00
Daniel Marjamäki e9fefcac46 gcc 4.5 compatibility 2018-03-30 21:04:32 +02:00
Daniel Marjamäki 25ef18ab11 astyle formatting
[ci skip]
2018-03-22 07:14:01 +01:00
amai2012 ab02595be1 Improve debug output in case of SIGABRT (add hint about assertion) and small refactoring 2018-03-20 14:24:45 +01:00
Daniel Marjamäki 46307df9b6 Renamed method 2018-03-11 15:06:08 +01:00
orbitcowboy 50844aa7fc checkType: Take into account the size of char. 2018-02-18 14:28:48 +01:00
Sebastian 78cceea8f6
dmake: Fix windows project and build (#1091)
Replace legacy dmake.vcproj with according .sln and .vcxproj files.
Update windows code in filelister.cpp so dmake compiles and works again.
2018-02-17 06:31:12 +01:00
Daniel Marjamäki db274e8308 Fix testrunner in cygwin 2018-02-10 15:34:49 +01:00
Daniel Marjamäki 780bd7e63e More flexible loading of platform files, when using --platform it should not be necessary to provide the full path 2018-02-09 16:22:22 +01:00
Matthias Krüger f009cfc845 fix some typos found by codespell. 2018-02-04 20:53:43 +01:00
Daniel Marjamäki 2f508c0bba 1.82: Updated versions 2018-01-14 16:25:17 +01:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ivan Maidanski 97ffec85c0 Fixed #7502 (Correct exit code if never used function is found) (#1026) 2018-01-12 08:24:01 +01:00
BNT fd76abba16 also generate debug information when building for release. This makes (#1003)
debugging and profiling easier and has now drawback as long as the PDB
files are not distributed (which would blow up installers)
2017-11-29 08:31:30 +01:00
amai2012 2f2172e1a7 #8178 Remove all references to XML version 1 2017-11-22 10:49:59 +01:00
Ali Can Demiralp bf174f583b Link to Shlwapi.lib on MSVC to get rid of missing symbol issues. (#978) 2017-10-18 17:38:15 +02:00
Dmitry-Me 93e5140945 Better variable names 2017-10-14 23:05:58 +03:00