Commit Graph

112 Commits

Author SHA1 Message Date
Daniel Marjamäki 1faca91c1d Added 'endsWith' utility function. This will make compiling the democlient easier. 2017-04-01 18:14:18 +02:00
PKEuS cfac3b457d Several small refactorizations 2016-12-06 22:12:02 +01:00
orbitcowboy 4a439b9308 It is more efficient to provide a character instead of a string when searching for a single character. This has been fixed in various places. 2016-11-30 12:01:22 +01:00
orbitcowboy 8a45c3192b There is not need to clear a string directly after its creation. 2016-11-30 10:39:14 +01:00
PKEuS 29e1fe136a Fixed Visual Studio build after pathmatch.h/cpp was moved to lib, fixed compiler errors about getcwd 2016-10-02 15:48:03 +02:00
Daniel Marjamäki 91d97c556d Path: Add methods Path::isAbsolute() and Path::getCurrentPath() 2016-10-02 12:06:55 +02:00
Daniel Marjamäki 2ed50fbf5a Refactoring 2016-08-13 15:23:46 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Alexander Mai f762affea0 Small refactoring: replace NULL by nullptr, remove redundant static keyword, Tokenizer::setVarId() uses const variable 'notstart' 2015-11-30 22:13:49 +01:00
Matthias Krüger c7bbc27130 Preprocessor: run paths of some error messages through Path::simplifyPath()
teach Path::simplifyPath() to recursively remove "./././" from beginning of paths.
2015-11-30 19:30:37 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Miika-Petteri Matikainen 1d4e33e792 Treat *.hh and *.hxx files as C++ files
Previously they were erroneously detected as C files.
2015-11-08 09:43:06 +02:00
Dmitry-Me f0e0201c2d Better handle double slashes, more tests 2015-02-16 13:11:13 +03:00
Daniel Marjamäki 6afe2e9fdc astyle formatting 2015-02-13 16:36:47 +01:00
Dmitry-Me 7961bba0da Path: better handling of UNC paths 2015-02-13 16:32:45 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
PKEuS 5bc775e43e Refactorization: avoid string copying in Path::getPathFromFilename() 2014-10-30 23:48:23 +01:00
Daniel Marjamäki dd6ade9831 Fixed #6231 (mingw compiler error: Path::getAbsoluteFilePath) 2014-10-21 18:46:09 +02:00
Robert Reif e2f72b4cb1 Fixed #6215 (Move Windows platform types into library) 2014-10-19 07:34:40 +02:00
orbitcowboy be49185471 Fixed #5925: The first include in path.cpp is not path.h and astyle run. 2014-06-16 15:11:44 +02:00
PKEuS e9411e05ba Refactorized inefficient usage of std::string and const char[]. 2014-04-02 13:56:34 +02:00
Daniel Marjamäki e48dfb0e6a cygwin: apply cygwin compilation tweaks. thanks ir0nh34d. 2014-03-19 21:20:30 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Ryan Pavlik 32bf275447 Fix case-insensitive string compare function on MinGW 2014-01-17 15:29:53 -06:00
Daniel Marjamäki e446a28b3d Refactoring FileLister and Path so they don't depend on Library 2013-10-31 19:09:01 +01:00
Sam Truscott 6806fd8135 Extended Qt support through Library 2013-10-20 14:09:10 +02:00
PKEuS a9a5dc0354 Updated to AStyle 2.03, require this version 2013-08-07 16:27:37 +02:00
Daniel Marjamäki d7a52eaecd Fixed #4608 (false positive: (style) struct or union member is never used.) 2013-03-01 16:13:04 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Simon Kagstrom 95b51d02c9 path: Add getPathFromFilename (returns the path part of a filename)
E.g.,

  /tmp/a.h -> /tmp/
  a.h ->

etc.
2012-12-28 12:44:26 +01:00
acm4me 7da155c8ba Support for Sun Studio C++ compiler 2012-12-27 11:51:12 +01:00
Daniel Marjamäki 233b7ddb4c Fixed #4323 (False Positive: Null pointer dereference) 2012-11-29 10:32:34 +01:00
Daniel Marjamäki dbddbe75bf Path: Removed java/c# handling. Thanks amai. 2012-10-03 19:47:14 +02:00
XhmikosR 6e4e3dfbfb lib: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-17 13:51:23 +02:00
Ettl Martin 5d088aa99c fixed wrong spelled words in comments. No function change. 2012-05-05 15:21:27 +02:00
PKEuS 9f054fbb3c Fixed crash when "-rp=" or "--relative-paths=" is given - print Error. 2012-04-14 14:44:15 +02:00
PKEuS 25167b58a9 Implemented #2990: Print relative paths if -rp or --relative-paths is given 2012-04-06 10:49:21 +02:00
PKEuS 2ba2a4e6ae Some refactorizations 2012-02-18 11:55:05 +01:00
Daniel Marjamäki ee55d3294a Refactoring. Assume that .C files contain C code on case insensitive filesystems. 2012-01-08 10:34:31 +01:00
Reijo Tomperi 93e3e7361e In unix .C is considered C++. Changed isC() and isCPP() to work like they were before refactoring. 2012-01-07 10:47:15 +02:00
Reijo Tomperi e91d239ea5 Refactor: Move file extension checks from Tokenizer to Path class. This has also functional change as now also file.JAVA is considered a Java file. 2012-01-06 21:56:28 +02:00
PKEuS 8378153669 Fixed missing include 2012-01-06 18:11:06 +01:00
Daniel Marjamäki de4a64332e Refactoring: Copy FileLister::acceptFile to Path::acceptFile. Use Path::getFilenameExtension and Path::acceptFile in Tokenizer. Use Path::acceptFile in CppCheck::processFile instead of hardcoded handling. 2012-01-06 17:31:10 +01:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
PKEuS 6b6f780057 code cleanups and refactorings 2011-11-26 21:02:04 +01:00
Benjamin Goose 463b105d98 Add condition for HP-UX. 2011-10-20 09:01:58 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Kimmo Varis 371838b9cb CLI: Warn if user tries to exclude header files.
Filename exclusion (with -i) works only for the source files.
Print a warning if user tries to exclude header file. The warning
instructs user to use --suppress for ignoring warnings from the
header files.
2011-08-06 17:24:10 +03:00
Daniel Marjamäki 6e48ab4384 astyle formatting 2011-04-27 18:30:37 +02:00
Greg Hewgill f0468952f8 Portability: Raise an error if a platform-specific filename compare function is not specified 2011-04-27 21:08:10 +12:00
Lieven de Cock 97328f08de Improve/cleanup Path::removeQuotationMarks(). 2011-03-30 21:46:41 +03:00
Kimmo Varis 4d4b28b075 Remove './' at begin of path in Path::simplifyPath.
The './' is not needed at begin of path for files we check. And it
only makes paths longer. This also makes it easier to match paths.
2011-03-29 20:53:18 +03:00
Kimmo Varis b889f663ae Add Path::removeQuotationMarks() to clean path. 2011-03-28 22:14:19 +03:00
Kimmo Varis 86ac25456e Move sameFileName() method to Path class.
Ticket #2445 (Move FileLister classes from LIB to CLI). Moving
sameFileName() to Path allows moving FileLister* classes to CLI.
2011-01-18 19:58:16 +02:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Kimmo Varis 9627b667a1 Move simplifyPath method from FileLister to Path class.
simplifyPath() "fits" better to Path class conceptually. It handles
paths, not lists them. Also this way we get rid of few unneeded
dependencies to FileLister class.
2010-10-29 22:21:27 +03:00
Daniel Marjamäki 3f79faac2a Fixed #2059 (cppcheck gives wrong path in error description) 2010-09-22 19:52:14 +02:00
Ettl Martin f6e75b5542 fixed clang++ warning: lib/path.cpp:80:2: warning: no newline at end of file [-pedantic] 2010-09-16 21:39:17 +02:00
Kimmo Varis 342632a618 Remove './' from begin of paths when printing progress. 2010-07-19 15:05:44 +03:00
Kimmo Varis dc77bc69a0 Move path simplifying code to Path class. 2010-07-19 14:27:05 +03:00
Kimmo Varis 0485976c54 Use std::replace() to replace chars in paths. 2010-07-19 13:02:04 +03:00
Kimmo Varis 3c12d23fd9 Add Path class for path handling routines.
In this initial commit the Path class contains two methods for
converting path separators. I want to move cppcheck path handling
to direction that we internally have paths with / separator. And
convert from/to native separators when needed.
2010-07-17 17:38:36 +03:00