Commit Graph

332 Commits

Author SHA1 Message Date
Michael Tautschnig 6590a7e2bb Simplify and modernise array-is-uniform code
Having two Booleans that need to be kept in sync makes it harder to reason
about. Instead, use a single Boolean and use C++-11 std::all_of instead of
rolling our own loop.

Additional cleanup: remove unused cassert header.
2018-11-05 19:16:18 +00:00
Vojtěch Forejt 9d0993ca56
Merge pull request #3233 from diffblue/cprover-smt2-2
SMT2 backend testing
2018-11-05 15:29:48 +00:00
Daniel Kroening b2c56d16c7 enable SMT2 tests on CodeBuild 2018-11-05 12:44:37 +00:00
John Nonweiler 7a0eff900a Add script to filter Doxygen warnings
Add a list of expected warnings from Doxygen, a Python script to
filter out those warnings from the output from Doxygen, and a simple
bash script to run doxygen using this filter.

In some cases, it would be relatively easy to fix the Doxygen
documentation so that we don't get these warnings.  However, in other
cases there are bugs in Doxygen where the code and documentation are
perfectly valid, and Doxygen gives an erroneous warning message.

Currently, CI uses another script to filter out warnings related to
lines of code which have not been changed.  However, this doesn't work
well because the line number reported for a warning is often not the
line where the problem lies.

The new script should be useful for CI, and also for checking changes
locally before running CI.
2018-11-02 17:06:44 +00:00
Michael Tautschnig 3a67fb64aa Check for uses of __CPROVER_ in the linter
This should help avoid future code introducing literal uses of __CPROVER_ back
into the code base.
2018-10-29 17:00:12 +00:00
Michael Tautschnig a91a73e4fd linter: Fix missing comma
Reported by Semmle's LGTM
(https://lgtm.com/projects/g/diffblue/cbmc/alerts/?mode=list).
2018-10-15 11:00:59 +00:00
Norbert Manthey d5ea30600f ls_parse: improve debugging by printing a trace
In case parsing a linker script fails, generate a trace, so that
debugging is possible. This way, unknown blocks in linker scripts
can be spotted more easily.
2018-07-12 11:41:21 +02:00
Norbert Manthey 17bc726360 ls_parse: Allow handling unknown blocks
The Xen linker script has a block "PHDRS" that results in a failure
of the ls_parse.py script. As there is nothing to be done in that
script for that block, this commit adds an empty handler for this
block name. In case more blocks should be added, only the regular
expression to match the blocks has to be modified.
2018-07-12 11:41:15 +02:00
Kurt Degiorgio 0b90c17a8c JBMC: Moved format_classpath.sh to scripts/format_classpath.sh
'format_classpath.sh' is used in regression tests that make use of the
'classpath' option. This script is needed to deal with the fact that
classpath syntex is OS-dependent.

The java concurrency regression tests make heavy use of this option as
such this commit moves 'format_classpath.sh' to
'scripts/format_classpath.sh'.

Furthermore, this commit makes a very small change to 'appveyor.yml'
that enables existing java concurrency regression tests to run on
Windows.
2018-06-24 15:35:02 +01:00
Michael Tautschnig 2ed63f5ab6
Merge pull request #2156 from tautschnig/gcc-8-fixes
Fixes to build using GCC 8
2018-06-06 22:08:34 +01:00
Michael Tautschnig fc670b5cb3 Do not lint .h files in regression/ 2018-06-06 15:55:47 +00:00
Michael Tautschnig 4f3c102109 Silence Minisat's use of realloc on non-POD and fix and use its xrealloc
This was a new GCC 8 warning; testing on errno == ENOMEM with && opened the door
for non-compliant implementations to fail to allocate without capacity()
failing.
2018-06-05 09:05:16 +00:00
Michael Tautschnig 09b8cf7960
Merge pull request #2014 from tautschnig/cadical-experiment
Performance test extensions and updates
2018-06-01 10:13:18 +01:00
Peter Schrammel 779fa7102b
Merge pull request #2253 from peterschrammel/documentation/override2
Get legalistic about use of override without virtual
2018-05-30 09:29:47 +01:00
Peter Schrammel 050b3444e0 Re-enable enforcement of override without virtual 2018-05-29 16:07:00 +01:00
Peter Schrammel a90ea445a5 Add module dependency check to CPP-LINT
To use it just put a module_dependencies.txt into a directory,
which lists all modules that it is allowed to include header
files from.
2018-05-29 14:05:17 +01:00
Peter Schrammel d94545250d Adapt cpplint header guard check
to deal with non-top-level `src` and `unit` directories
2018-05-20 23:00:03 +01:00
Michael Tautschnig a47941d720 perf-test: add -W/--witness-check to validate SV-COMP witness checking 2018-05-14 14:26:42 +01:00
Michael Tautschnig 5b0395ff28 perf-test: Update Ubuntu AMI ids for latest version 2018-05-14 12:31:09 +01:00
Michael Tautschnig 1288ec753b perf-test: speed up builds just like e7bb127f0e did
apt-get update takes considerable time, removing one call is desirable.
2018-05-14 12:31:09 +01:00
Michael Tautschnig afccaec2af Provide goto-cc in performance tests 2018-05-14 12:31:09 +01:00
Michael Tautschnig f802d87ba8 Support CaDiCaL in performance tests, remove redundant script 2018-05-14 12:31:09 +01:00
Matthias Güdemann 213db5fd6b Remove trailing `;` from namespace closing bracket 2018-05-10 12:58:05 +02:00
Michael Tautschnig 6b8583d795
Merge pull request #2100 from tautschnig/string-table-cleanup
Remove unused entries from the string table
2018-04-26 20:51:35 +01:00
Michael Tautschnig f79b45345a Check that the string table does not include unused entries 2018-04-25 15:04:49 +01:00
Lukasz A.J. Wrona 692c4f377a Remove brace checking from cpplint 2018-04-24 18:02:05 +01:00
Daniel Kroening 74a37c6352
Merge pull request #1988 from tautschnig/cadical
Add support for CaDiCaL
2018-04-24 14:13:30 +01:00
Michael Tautschnig c34e073af6 Add support for CaDiCaL
CaDiCaL is Armin Biere's latest solver with a minimal IPASIR-compatible
interface. In some initial experiments it considerable outperforms Minisat.
2018-04-22 20:31:50 +01:00
Matthias Güdemann aa3caa3ad0 Fix CMake build for Glucose Syrup 2018-04-21 17:26:40 +02:00
Michael Tautschnig df1c7e3518 Builds require javac as of f66288b4 2018-03-23 19:57:35 +00:00
Vlastimil Zeman a5c26a8022
Add script for uploading documentation
To keep it as fast/current as possible we will use rsync that to upload
only changes and delete what is no longer part of documentation.
2018-03-20 12:16:03 +00:00
Michael Tautschnig c62b957a5e
Merge pull request #1551 from tautschnig/perf-test-improvements
Improvements to perf-test(.py)
2018-02-22 16:43:19 +00:00
Kareem Khazem 53df56780e
[path explore 6/7] cpplint & clang-fmt agree on :
cpplint now complains if a derived-class declaration is formatted as

  class derived: base

rather than complaining if it is formatted as

  class derived : base

(with a space on both sides of the colon). The latter style is the one
enforced by clang-format, meaning that the two linters were inconsistent.
2018-02-20 23:50:14 +00:00
Pascal Kesseli 703e4a340b Remove unapproved C++11 header warning.
Removed list of C++11 headers for which Chromium has preferred
alternatives, since these don't apply to us.
2018-01-18 12:13:34 +01:00
Michael Tautschnig 03095d47d1 Use svcomp18 as base 2017-12-08 14:51:14 +00:00
Michael Tautschnig f659577ef2 perf-test: build configuration using glucose
Configuration can be used/enabled using -B codebuild-glucose.yaml
2017-12-08 14:50:32 +00:00
Michael Tautschnig 98b9ae65be SV-COMP now requires zip files 2017-12-08 14:50:32 +00:00
Michael Tautschnig 1c0cf3224d Support custom CodeBuild templates 2017-12-08 14:50:32 +00:00
Michael Tautschnig 6eeb672bec Permit selecting a regular-expression-defined set of tasks 2017-12-08 14:50:31 +00:00
Michael Tautschnig d3b29d233f Update cprover-sv-comp, benchexec to latest version 2017-12-08 14:50:31 +00:00
Michael Tautschnig 3269da7049 Utility to generate HTML reports from perf-test experiments
This is by and large in a works-for-me state and may need documentationa and
generalisation.
2017-12-08 14:50:31 +00:00
reuk d3d632d8d2 Use multi-argument form of FILE command 2017-11-15 18:13:29 +00:00
Daniel Kroening df45bdb2ce
Merge pull request #1524 from reuk/reuk/fix-linter
Disable dowhile brace check by default
2017-10-27 19:29:43 +01:00
Daniel Kroening 021fe8fc32 Merge pull request #1492 from tautschnig/perf-test
Script to automate performance evaluation of CBMC on AWS
2017-10-25 21:22:18 +01:00
reuk a00edd3e6c Disable dowhile brace check by default 2017-10-25 13:34:56 +01:00
Michael Tautschnig c3e67261b5 Script to automate performance evaluation of CBMC on AWS
Evaluation is performed for a chosen GitHub or CodeCommit repository and
commit/branch/tag by running (a subset of) SV-COMP benchmarks. Runs are
done both in optimised as well as in profiling mode.

Execution should be as simple as

  ./perf_test.py \
        -r https://github.com/diffblue/cbmc -c develop \
        -e tautschn@amazon.com

assuming that AWS access keys are set up (as required for AWS cli use) and boto3
is installed. Emails will then be sent as results become available.

The script sets up (and persists) an S3 bucket for storing results, SNS
queues for email updates on the process, as well as an EBS snapshot
containing the benmarking data.

For each benchmarking run, builds are set up and performed via
CodeBuild. Evaluation is then performed using AutoScalingGroups
synchronised via SQS.

The design premise for this work was:

"Compare multiple configurations for performance, correctness, capabilities."

This was broken down into:

Configuration: target platform, timeout, memory limit, benchmark set, tool
options, source version (=repository + revision).

Compare: log files, counterexamples, CPU profile, memory profile, verification
results.
2017-10-20 18:11:12 +01:00
reuk 55e6594d04 Fixup cpplint.py 2017-10-17 13:16:59 +01:00
reuk 554cb54400 Adjust cpplint to disable whitespace checks by default 2017-10-16 11:52:18 +01:00
Chris Smowton 78cd286d0b Fix messaget's copy-constructor and operator=
These were broken, leaving an mstreamt whose back-pointer pointed
into a different messaget than the one it enclosed, which could then have
its message_handlert changed with unexpected side-effects, or be deleted
causing a probable segfault on next log message.

The added unit tests verify that this no longer happens.
2017-10-11 14:51:20 +01:00
Thomas Kiley ef76441a72 Corrected error in the run_diff script
Script was erroneously reporting that there was no cpplint.py in the
scripts folder when the problem was a lack of doxygen executable.
2017-10-02 14:34:53 +01:00
reuk 88c2f9c5c7 Use DownloadProject method for integrating sat libraries 2017-09-27 11:22:25 +01:00
reuk ad486f8c55 Set up glucose externalproject 2017-09-11 14:29:12 +01:00
reuk 22c2ab9f04 Add CMakeLists 2017-09-11 14:29:12 +01:00
Chris Smowton 389221ebee run_diff.sh shellcheck fixes
* Replace backticks with $()
* Double-quote filenames that might conceivably contain troublesome special chars (*, space etc)
2017-09-06 11:18:32 +01:00
Chris Smowton dce6ae141a Improve filter_by_diff.py and friends
* Attempts to cope with invalid UTF-8 (present in a few CBMC files) using iconv
* Splits the filter-by-diff job into two stages (diff -> JSON description of interesting lines
  and JSON -> filtered output)

This means that run_diff.sh CPPLINT is now practical, and produces a report of the linting
problems in develop but not in master (around 150 lines as of the time of writing) in about 2 minutes.
2017-09-06 11:18:14 +01:00
Kareem Khazem 85521b0263
goto-gcc reads definitions from linker scripts
goto-gcc now runs the ls_parse.py script whenever the target codebase is
being compiled with a custom linker script (specified with the -T
option). goto-gcc then synthesizes the linker script definitions that
ls_parse reported, and adds them to the goto-program as if those
definitions were defined in the target C program rather than the linker
script.

This solves a problem where the values of some C variables are
inaccessible from CBMC because those variables are defined in the linker
script rather than the C codebase. It also solves the problem of CBMC
not knowing what memory regions are accessible to the C program, again
because the memory regions are declared to be valid in the linker
script.

This commit also introduces three tests for this functionality.

This commit also fixes a small bug in ls_parse.py that made it reject
some valid linker scripts.
2017-09-04 11:39:32 +01:00
Peter Schrammel 4e7a480ee0 Make linter accept alternative copyright header 2017-08-29 22:12:56 +01:00
Peter Schrammel 22016c0469 Do not lint C++ regression tests 2017-08-23 12:51:50 +01:00
Peter Schrammel 3a67dc4052 Merge pull request #1267 from reuk/reuk/master-into-tgs
Merge master into test-gen-support
2017-08-23 09:01:36 +01:00
Daniel Kroening 69a82fc7ff Merge pull request #1175 from karkhaz/kk-cpplint-if-zero
Don't lint text between #if 0...#endif
2017-08-23 06:47:39 +01:00
reuk f17b637121 Merge master into tgs 2017-08-22 15:06:55 +01:00
Daniel Kroening 0346dcd375 Merge pull request #1232 from reuk/reuk/add-merge-driver
Add merge driver
2017-08-11 20:44:34 +02:00
reuk 4d1c26eb92 Add merge driver 2017-08-11 16:37:10 +01:00
Daniel Kroening 517e69f1e5 silence linter on builtin headers 2017-08-10 09:47:01 +02:00
Peter Schrammel bfb397e6fc Suppress some doxygen warnings 2017-08-09 13:34:47 +01:00
Peter Schrammel 8c25dcf3cc Workaround for travis performing shallow clones with wrong branch
travis clones a repo by 'git clone --depth 50 repo' which is ok if the
PR target is the master branch.  It should actually add '--branch=
$TRAVIS_BRANCH' to the clone command.  This commit provides a
workaround.
2017-08-07 13:41:04 +01:00
Chris Smowton c4a072bd6e Merge remote-tracking branch 'upstream/master' into merge-master-2017-08-03 2017-08-03 15:25:32 +01:00
Joel Allred 71d8a14a0d Add zsh support to auto-complete
This required the replacement of calls to _filedir in the script.
2017-07-26 23:32:41 +01:00
Kareem Khazem d4be554988 Don't lint text between #if 0...#endif 2017-07-25 12:36:08 +01:00
Daniel Kroening d80b10ed2f Merge pull request #1031 from pkesseli/cpplint/allow-anonymous-namespaces
Allow anonymous namespaces
2017-07-17 17:28:09 +01:00
Daniel Kroening d36c0d06a1 Merge pull request #1080 from peterschrammel/travis-check-doxygen
Report doxygen warnings on travis
2017-07-15 15:58:45 +01:00
Pascal Kesseli 427194c626 Allow anonymous namespaces
Only give warnings for namespaces with actual names, in accordance with
ad41375353.
This enables the use of anonymous namespaces without warnings.

Fixes: #932
2017-07-12 15:36:32 +02:00
Chris Smowton 0e1b95c5dc Merge remote-tracking branch 'upstream/master' into merge_master_20170705 2017-07-07 09:30:07 +01:00
Peter Schrammel c9acbeee91 Report doxygen warnings on travis 2017-07-06 07:19:55 +01:00
Peter Schrammel ebb745ff75 Extend run_diff to doxygen 2017-07-06 07:19:55 +01:00
Peter Schrammel 64a3ab5b64 Rename run_lint to run_diff 2017-07-03 17:10:23 +01:00
Peter Schrammel 7af068eb2e Generalise run_lint to run with different tools 2017-07-03 17:09:42 +01:00
Peter Schrammel 428507bc44 Generalise filter_by_diff to output lines between warnings 2017-07-03 16:20:35 +01:00
Peter Schrammel 9714e12920 Rename linter filter script 2017-07-03 16:20:17 +01:00
Pascal Kesseli 78a23bbd69 Fix removal of first component
Removal of first component for header guard suggestion is hard-coded to
remove 4 characters ("src/").  This doesn't work with all directory
names ("unit/").
2017-06-28 11:25:07 +02:00
Daniel Kroening 17e596356f Merge pull request #1005 from reuk/script-update
Stop attempting to convert previously-converted doc headers
2017-06-18 17:11:29 +01:00
Daniel Kroening a2a143a4d3 Merge pull request #1022 from karkhaz/ls-parse-script
Add script to find linkerscript-defined info
2017-06-18 17:10:14 +01:00
Kareem Khazem 6cd9693f65 Add script to find linkerscript-defined info
Add ls_parse.py, a script to discover symbols whose values are defined
in a linker script, and valid memory extents corresponding to sections
in an object file. ls_parse can emit this information as a C file,
suitable for compiling into a goto-binary and linking with the rest of
the codebase. ls_parse can also emit the information as a JSON file,
suitable for automatic processing from within goto-cc. This supports
CPROVER in knowing the actual values of symbols that are not defined in
the C source.

CR: https://cr.amazon.com/r/7191907/
2017-06-15 19:27:54 +01:00
Chris Smowton eed0afb9a7 Merge remote-tracking branch 'origin/master' into smowton/merge/master_20170614 2017-06-14 15:56:45 +01:00
Chris Smowton a320377c27 Merge commit 'aed3c25' into smowton/merge/master_20170614 2017-06-14 15:55:11 +01:00
martin 975b5a3550 Get the linter to check for assertions and give a deprecated warning. 2017-06-13 16:12:12 +01:00
reuk bec818e179 Remove duplication from conversion script 2017-06-13 13:14:24 +01:00
reuk a6c32b0d96 Stop attempting to convert previously-converted headers 2017-06-12 19:14:27 +01:00
reuk aed3c25fa3 Modify reformatting script to retain existing headers 2017-06-06 15:13:09 +01:00
reuk 69dacac7e6 Update postprocessor comparison script 2017-06-06 15:13:09 +01:00
reuk 0f6df5c2fb Add doc conversion driver script 2017-06-06 15:13:09 +01:00
reuk e0f2b2b5ca Fix parameter list bug 2017-06-06 15:13:09 +01:00
reuk 7ed20c1839 Allow python script to reformat in place 2017-06-06 15:13:09 +01:00
reuk 3e623f6e96 Revert "Fix up linter script to accept new Copyright label"
This reverts commit 60c5091e36.
2017-06-06 15:13:09 +01:00
reuk 60c5091e36 Fix up linter script to accept new Copyright label 2017-06-06 14:42:12 +01:00
reuk fa1d8e2359 Move conversion scripts to scripts folder 2017-06-06 14:42:12 +01:00
Michael Tautschnig f0fe0200b3 Make the linter ignore generated builtin-header files 2017-05-23 11:01:31 +01:00
reuk 72da3fb3c4 Give pragma files a '.def' suffix 2017-05-18 11:39:41 +01:00
reuk 44c96ebda3 Build cleanly without globally disabling warnings
Disabling warnings globally by setting 'Wno-deprecated-register' and
'Wno-sign-compare' in CXXFLAGS will silence these errors, even in new
code. It's better to use `pragma`-based warning suppression, so that
warnings are only disabled in locations that won't or can't be fixed.
Likewise, rather than filtering 'Wpedantic' from CXXFLAGS when building
some of the solvers, it's better to disable warnings just on the
problematic headers.
2017-05-18 11:33:16 +01:00
reuk a0ef01a2e1 Update linter to find std::endl 2017-05-16 16:21:42 +01:00
reuk 24fd67b55d Give pragma files a '.def' suffix 2017-04-26 22:54:50 +01:00
reuk 1dc27ae206 Build cleanly without globally disabling warnings
Disabling warnings globally by setting 'Wno-deprecated-register' and
'Wno-sign-compare' in CXXFLAGS will silence these errors, even in new
code. It's better to use `pragma`-based warning suppression, so that
warnings are only disabled in locations that won't or can't be fixed.
Likewise, rather than filtering 'Wpedantic' from CXXFLAGS when building
some of the solvers, it's better to disable warnings just on the
problematic headers.
2017-04-26 16:29:49 +01:00
Vojtěch Forejt 29d67d39e2 Merge pull request #679 from diffblue/master
Update test-gen-support from master
2017-03-22 21:39:07 +00:00
Nathan Phillips 36dee831ad Check that filter_lint_by_diff.py exists 2017-03-21 14:09:44 +00:00
Nathan Phillips 6bba4ab110 Work across repos
Use the path of the containing repository of the current path, not the one the script is downloaded into
2017-03-21 14:09:26 +00:00
Nathan Phillips 5fef8411b1 Work with submodules
Made linter use paths relative to current submodule, not the lowest containing repository
2017-03-21 14:07:56 +00:00
Nathan Phillips 9cd9843d36 Comment in lint filter 2017-03-21 14:07:56 +00:00
Nathan Phillips 88816e9998 Ignore stdout, only pass errors to filter script 2017-03-21 14:05:48 +00:00
Peter Schrammel aa8c91ee61 Update test-gen-support from master 2017-03-20 23:17:32 +00:00
thk123 835277b01a Fixed crash on non-ascii diff
Sometimes the diff file would contain a unicode character. Since we were
opening the file, this meant that unidiff was reading the file in the
wrong format. By letting unidiff handle reading the file we slightly
simplify the code and fix this problem.
2017-03-15 16:27:25 +00:00
Vlastimil Zeman 0381aab5ef Support for Linux based on musl-libc.
Change `#ifdef __linux__` and `#if defined(__linux__)` when it really
means *linux with glibc*. To avoid failures and be more specific
it is now adding `defined(__GLIBC__)` to check if `glibc` is present.
2017-03-15 13:51:59 +00:00
Robert (Jamie) Munro 5baa807a63 Add space after comma globally within the line 2017-03-15 13:51:59 +00:00
Robert (Jamie) Munro f1a99f78f2 Replace tabs globally within the line 2017-03-15 13:51:59 +00:00
Robert (Jamie) Munro 0f69c93415 Fix missing space after , errors 2017-03-15 13:51:58 +00:00
Robert (Jamie) Munro 32f91b828f Fix ; after } errors 2017-03-15 13:51:58 +00:00
Robert (Jamie) Munro db2858718d Explore matching nested bracketed stuff 2017-03-15 13:51:58 +00:00
Matthias Güdemann 6861a5826d remove `<regex>` from unapproved headers in cpplint
The reason for `<regex>` being discouraged seems to be a preference for an
external library within Google:

https://github.com/google/styleguide/issues/194
2017-03-15 13:38:55 +00:00
Daniel Kroening 0139558ba4 Merge pull request #570 from zemanlx/feature/compile-on-musl
Support for non-glibc linux which use musl-libc
2017-03-13 15:28:19 +00:00
Daniel Kroening aeb99e86fd Merge pull request #558 from rjmunro/feature/cpplint-sed-format
cpplint sed format improvements
2017-03-13 15:26:01 +00:00
Vlastimil Zeman f6d9f3bebc Support for Linux based on musl-libc.
Change `#ifdef __linux__` and `#if defined(__linux__)` when it really
means *linux with glibc*. To avoid failures and be more specific
it is now adding `defined(__GLIBC__)` to check if `glibc` is present.
2017-03-10 11:58:17 +00:00
Matthias Güdemann 4e8760856b remove `<regex>` from unapproved headers in cpplint
The reason for `<regex>` being discouraged seems to be a preference for an
external library within Google:

https://github.com/google/styleguide/issues/194
2017-03-09 11:05:27 +01:00
Robert (Jamie) Munro 0b11c4385f Add space after comma globally within the line 2017-03-03 10:26:51 +00:00
Robert (Jamie) Munro ce6b2b4ec7 Replace tabs globally within the line 2017-03-03 10:26:51 +00:00
Robert (Jamie) Munro 89d259eb97 Fix missing space after , errors 2017-03-03 10:26:51 +00:00
Robert (Jamie) Munro 4e6c7b2144 Fix ; after } errors 2017-03-03 10:26:51 +00:00
Robert (Jamie) Munro a43b86297d Explore matching nested bracketed stuff 2017-03-03 10:26:51 +00:00
Vojtěch Forejt 2f5b86689f Autocomplete script for bash
See documentation in scripts/bash-autocomplete/Readme.md
2017-03-02 15:10:57 +00:00
Chris Smowton 54ee5820b3 Fix lint filter against deleted files. Fixes #563
git-diff when a file has been removed diffs against /dev/null instead
of the usual pattern `b/some/path/to/file.cpp`. This change avoids
asserting a "b/" prefix in that case.
2017-02-21 13:25:36 +00:00
Chris Smowton 628c66bbaf Add travis-lint script
This uses $TRAVIS_BRANCH to find the pull-request merge target,
and installs the needed Python package.
2017-02-17 13:02:49 +00:00
Chris Smowton 317ffbb0f3 Switch to lint filtering by Python script
This avoids number-of-arguments problems, and is briefer to boot.
It does need Python package unidiff however.
2017-02-17 13:02:49 +00:00
Robert (Jamie) Munro 8ccd570e09 Document output formats 2017-02-16 14:43:41 +00:00
Robert (Jamie) Munro 75cbe79e4e Write sed output to stdout for ease of piping to bash
Also fix other writes to stdout to be preceeded by #
2017-02-16 14:43:40 +00:00
Robert (Jamie) Munro 8ea1668b4a Support gsed output format for Mac OS
gnu sed is installed with this name by homebrew.
2017-02-16 14:43:39 +00:00
Robert (Jamie) Munro a55cd86c37 Add fixer to delete whitespace at end of lines 2017-02-16 14:43:01 +00:00
Robert (Jamie) Munro 6646e4b712 Add tabs -> 2 spaces fixer 2017-02-16 14:42:36 +00:00
Robert (Jamie) Munro cb9bb30660 Add fixer for missing space before { 2017-02-16 13:59:07 +00:00
Robert (Jamie) Munro 58b8d75f7c Add fix for space after `//` comments 2017-02-16 13:44:01 +00:00
Robert (Jamie) Munro b3d1c1e487 Add commented Fix that removes extra lines
Works, but breaks subsequent fixes in the same file. We will need to
reverse the order of line numbers if we want to use this, so that we
apply fixes at the end of the file first.
2017-02-16 13:44:00 +00:00
Robert (Jamie) Munro eb515e40c4 Add more types of fix to sed output format 2017-02-16 13:43:59 +00:00
Robert (Jamie) Munro e6b1201c1f Added "sed" output format that allow automatic fixes 2017-02-16 13:43:58 +00:00
Robert (Jamie) Munro dacece665f Add python encoding line 2017-02-16 13:43:57 +00:00
Michael Tautschnig da0b0d5581 Make the pre-commit hook report non-temporary path names (#477)
This also fixes the problem of failing to deduce the correct include
guards.
2017-02-02 20:39:09 +00:00
Michael Tautschnig 783e84cb3d Script to prepare out-of-tree (aka vpath) builds
Run ../scripts/vpath-setup.sh desired-build-dir from the src/ directory.
2017-01-25 22:06:46 +00:00
thk123 56aea470fd Commented out some false positive tests (#457)
These were causing a bunch of false positives that were making it hard
to find real errors. Until there is time to fix them, just disable them.

Issues associated area:
https://github.com/diffblue/cbmc-testgen/issues/76
  Multi-line template types are complaining about spaces around <

https://github.com/diffblue/cbmc-testgen/issues/75
  Open parentheses inside strings were reporting errors about
  parameters being spread across multiple lines

https://github.com/diffblue/cbmc-testgen/issues/49
  Errors related to final bracket needs to be on the same line as the final
  are being wrongly reported.
2017-01-20 21:57:16 +00:00
Michael Tautschnig 3ceecf6848 Remove explicit "python" as cpplint.py is executable
Follow-up to #433 as suggested by @peterschrammel.
2017-01-18 06:49:44 -08:00
Matthias Güdemann 21ae76103f set executable bit of cpplint.py 2017-01-13 16:48:48 +01:00
Peter Schrammel 81941be03c Merge pull request #428 from thk123/bug/deleted-file-lint
Run lint script handling deleted files
2017-01-12 16:07:58 +00:00
Peter Schrammel 094c76d73e Merge pull request #427 from NathanJPhillips/feature/allow-lint-from-any-folder
Allow lint to be called from any folder
2017-01-12 16:07:30 +00:00
Peter Schrammel adcf35bc78 Merge pull request #426 from NathanJPhillips/bugfix/linter-line-number-recognition
Prevent recognising lines by prefix
2017-01-12 12:32:17 +00:00
thk123 a4954cdaf6 Run lint script handling deleted files
Previously we would try and run git blame on a deleted file (since would
still show up in the diff) which would cause an error. Now we just skip
over such files.
2017-01-12 11:00:44 +00:00