Commit Graph

40 Commits

Author SHA1 Message Date
Kimmo Varis 70b153cc1e Disable fileListStdin test from testcmdlineparser.
That test hangs the test run.
2011-09-30 08:35:23 +03:00
Robert Reif 4d12372b65 run astyle 2011-09-29 19:23:30 -04:00
Joshua Beck 9583394eba Fix test and add info to -h output. 2011-09-27 01:02:58 -05:00
Joshua Beck 87cff36f9d Updated manual and added test for reading file list from stdin. 2011-09-26 20:43:39 -05:00
Simon Martin ba2591b002 Take into account kimmov's review comments 2011-09-17 16:55:59 +02:00
Simon Martin 21a4999c1b Make the build warning clean with clang++ 2011-09-17 14:40:17 +02:00
Kimmo Varis 288efd832c Tests: Add more commandlineparser tests.
Add commandlineparser tests for giving two suppressions. Giving
two suppressions in one parameter is not yet supported so it is
todo-test.
2011-09-13 17:55:00 +03:00
Kimmo Varis 0c42f46717 Tests: Add tests for new --enable flags.
Adding tests for new --enable flafgs (performance, portability)
to CommandLineParser tests.
2011-09-04 21:45:52 +03:00
Daniel Marjamäki afed93d7d6 Command line: Added --std option. Right now only --std=posix is possible but other options might be added later. 2011-08-17 20:08:55 +02:00
Daniel Marjamäki 01b9c0707d Settings: Removed the --enable=posix option. Ticket: #2949 2011-08-14 09:45:53 +02:00
Kimmo Varis cfcfa3f000 Use "enabled" list for the style checking.
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.

Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00
Kimmo Varis babfba53fb Tests: Disable tests for CLI -i option.
The tests use non-existing relative paths. Currently the code
checks if the paths added to -i exist and hence these tests
fail.
2011-08-06 19:18:20 +03:00
Kimmo Varis f4950ea836 CLI: Rename --posix to --enable=posix.
Ticket: #2949 (new check: (style) finding non-reentrant functions)
Ticket: #2952 (CLI option --posix is wrong)
2011-08-03 10:28:36 +03:00
Kimmo Varis 335b52653e Tests: add semicolons after TEST_CASE() 2011-07-29 22:00:24 +03:00
Kimmo Varis a50f75ef86 Add --posix CLI option.
Part of ticket #2949 (new check: (style) finding non-reentrant functions)
2011-07-29 20:17:02 +03:00
Kimmo Varis 959a73f02e Add test for --check-config. 2011-05-04 21:07:02 +03:00
Kimmo Varis e7c56aebac Make "failing" cmdlineparser tests todo-tests. 2011-05-04 21:00:22 +03:00
Greg Hewgill 22210e0255 add --suppress= command line option 2011-02-23 20:10:32 +13:00
Kimmo Varis 2d6d8580d7 Allow to exclude filenames (with paths).
This expands the CLI exclude feature to also allow excluding
filenames (with paths). When filename with recognized extension
is given to -i option then matching filenames (with paths) are
ignored when checking.

Ticket #2538 (Allow excluding files from the checking)
2011-02-03 14:43:42 +02:00
Kimmo Varis ffc4bb481b Merge branch 'ignore-paths-cli' 2011-02-02 21:09:22 +02:00
Kimmo Varis 6401271ceb Add CLI support for ignoring paths.
Add support for giving list of ignored paths from CLI. This way
user can define paths one doesn't want to check (like generated
code). This first simple implementation only does exact matching,
no support for wildcards etc. And matching is always agains dir
names.

If the filtered dir name is part of the checked filename then the
file is ignored.

Ticket #1690 (Ability to exclude files and directories from checks)
2011-02-02 14:34:04 +02:00
Kimmo Varis 1da88de932 Imrove --xml-version option parsing.
Allow --xml-version parsing to recognize also version 1 and print
errors about invalid values.
2011-02-02 14:04:50 +02:00
Kimmo Varis 1118b132b9 Add couple of tests for xml-version cmd line option. 2011-02-02 13:33:57 +02:00
Kimmo Varis b9a0e10b9a Several fixes to cmd line tests.
There were several tests handling two parameters as one string.
Eg. "-I path" which doesn't work correctly. Fixed these
problematic tests.
2011-01-29 19:18:47 +02:00
Kimmo Varis d334a02801 Make --exitcode-suppressions option consistent.
The --exitcode-suppressions option was inconsistent with other
long options by taking the filename as separate argument. Now
it expects format --exitcode-suppressions=filename.txt like
other long options.

Ticket: #1837 (--suppresions file.txt inconsistent)
2011-01-29 19:18:47 +02:00
Kimmo Varis 081e364298 Rename --suppressions-list CLI option.
The option --suppressions-list was inconsistent with other options
so renaming it to --suppressions-list.

Ticket: #1837 (--suppresions file.txt inconsistent)
2011-01-28 13:26:43 +02:00
Kimmo Varis 090436ea95 Add cmd line parser tests for XML ver 2 options. 2011-01-27 14:25:10 +02:00
Kimmo Varis a794edd934 Don't stop processing cmd line after --errorlist.
Ticket #2441 (Parsing of command line arguments breaks after --errorlist)

Instead of stopping processing command line options after
--errorlist process them all. This way e.g. --verbose can be given
also after the --errorlist.
2011-01-27 11:14:08 +02:00
Kimmo Varis bd5e9e5309 Improve checking -D arguments for command line. 2011-01-17 21:19:27 +02:00
Kimmo Varis 6dd16d3919 Fix crash when giving -D without argument.
Fixes ticket #2476 (Crash when -D used without parameters.)
2011-01-17 21:03:22 +02:00
Kimmo Varis 846d3dae99 Accept include paths ending with backslash.
Convert include path to use internal path separators when parsing
command line. Convert back to native separators when using paths.

Ticket #2448 (Error in handling -I command line parameter)
2011-01-11 21:04:21 +02:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Daniel Marjamäki a9aa6375b7 gcc: disabled -Wconversion again - too many warnings 2011-01-01 09:16:31 +01:00
Kimmo Varis c6c5fc6a1c Add tests for remaining CLI options. 2010-12-04 14:13:44 +02:00
Pete Johns 77089293c6 Extracted Error and Output redirection.
Making reuse possible.
2010-09-26 13:19:30 +10:00
Daniel Marjamäki ad03c97a6e cmdlineparser: allow space between -D and define name. ticket: #2036 2010-09-08 17:42:28 +02:00
Kimmo Varis 3c8ffb90dd Add tests for userdefines and userincludes for CmdLineParser. 2010-09-08 18:02:22 +03:00
Reijo Tomperi 2ab78d819e One more encoding fix. 2010-09-07 00:12:24 +03:00
Kimmo Varis 1dfab9f02c Add more tests for CmdLineParser. 2010-09-06 23:16:52 +03:00
Kimmo Varis f36666572a Add couple of basic tests for CmdLineParser. 2010-09-06 22:31:06 +03:00