1
0
Fork 0
Commit graph

93 commits

Author SHA1 Message Date
krcroft
5071f76ccb Add a script to capture preprocessor #define statements 2020-03-14 17:01:43 +01:00
Patryk Obara
38e2944eae Implement counter for sanitizer issues 2020-03-11 10:38:10 +01:00
Patryk Obara
60198816f1 Rename count-bugs to count-clang-bugs 2020-03-11 10:38:10 +01:00
Joshua Fern
f2029d71d8 Update copyright dates to 2020 2020-03-07 00:18:01 +01:00
Patryk Obara
8b1603c5f2 Avoid counting duplicate warnings
Prevents inflation of effc++ warnings number.
2020-03-01 21:23:04 +01:00
krcroft
7957435c53 Improve layout of storage directory 2020-02-17 19:29:43 +01:00
krcroft
018cca2415 Expire records and cache at different timeframes 2020-02-17 19:29:43 +01:00
krcroft
82a22fd878 Let user specify branch(es) to operate on 2020-02-17 19:29:43 +01:00
krcroft
675d8b99bf Check dependencies and improve messages 2020-02-14 09:29:39 +01:00
krcroft
cdb6957bb6 Store GitHub credentials using git 2020-02-14 09:29:39 +01:00
krcroft
94cd6df6cd Add a script to fetch and diff GitHub workflow logs 2020-02-14 09:29:39 +01:00
krcroft
65d8187595 Test more criteria during PVS analysis
This commit:

- Adds a separate analysis run against the MIRSA (Motor Industry
  Software Reliability Association) criteria, which is extremely
  thorough. This tally is not summarized or considered fatal to the
  workflow. It runs virtually instantly, and the results are very
  interesting; however are too numerous to include in our general
  analysis (ie: over 13,000 issues).

- Changes the PVS summary script output to a tally-per-file instead
  of trying to summarize the nature of the issue, which was mostly
  unhelpful without the full text.

- Adds the full list of possible supressible issue to the report
  directory, so if further suppressions are needed then these will be
  easy to find and use.

- Adds one dr_flac suppression per the resolution here:
  mackron/dr_libs#117
2020-01-29 14:59:50 +01:00
krcroft
9df802fd56 Count the bugs reported by PVS-Studio 2020-01-15 18:30:45 +01:00
Oldman
db02acfccf
Strip trailing white-space as a pre-commit hook 2020-01-13 11:27:27 -08:00
Patryk Obara
a110153fff Bundle autoconf ax_cxx_* macros
Users, who try to compile keep tripping over it, despite documentation
in the INSTALL file.  Also, autoconf-archive might be hard to install
for users, who opted not to use MSYS2 and stick to MinGW only.

This commit bundles macros:

AX_CXX_COMPILE_STDCXX (version/serial 10)
AX_CXX_COMPILE_STDCXX_11 (version/serial 18)
2020-01-13 01:42:20 +01:00
krcroft
d56afec70b Only run config heavy if our repo has commits 2020-01-13 00:26:11 +01:00
krcroft
c776239c3c Switch from static to dynamically-linked libstdc++
When using C++11 code that can possibly throw exceptions (such as
std::make_shared(...) linking libstdc++.a using Clang on MSYS2
will generate errors such as:

  libstdc++.a(eh_personality.o): duplicate section
  `.rdata$_ZTSSt9exception[_ZTSSt9exception]' has different size

Although potential suggested fixes involve allowing duplicate symbols,
-Wl,--allow-multiple-definition, this solution can introduce unexpected
behavior when one symbol clobbers another symbol.

To solve this, switching to dynamic linking of the libstdc++ library
appears to be all that's needed.
2020-01-07 19:46:32 +01:00
krcroft
a852fe3eab Make MD docs comply with markdownlint 2020-01-07 19:28:12 +01:00
krcroft
312a763509 Verify Markdown documents in linting workflow
Also re-order to perform shellcheck first because it
requires the least installation work compared to pylint
and markdownlint.  The reason being if we're going to fail
during shellcheck, then we fail faster (and leave heavier
tasks for further down the line).
2020-01-07 19:28:12 +01:00
Patryk Obara
3be0409d25 Update copyright line in several scripts
Use the exact formatting suggested in COPYING file.

This change is basically a pretext to trigger a new clean build in
order to check if Coverity is capable of accepting new builds for
analysis finally.
2020-01-03 17:15:25 +01:00
Patryk Obara
ce7c27a48b Remove irrelevant ifdefs from unifdef-all script
OS/2 and DirectDraw support were removed during upgrade to SDL2.
2019-12-26 03:23:19 +01:00
Patryk Obara
44c7fb9165 Update CI to target SDL2 2019-12-26 03:23:19 +01:00
Patryk Obara
55b716f8ce Reverse sort by count and item name in the summary
When two files have the same number of warnings, they will appear
in the same order in the summary, making the diff between different
build logs smaller.
2019-12-12 21:24:40 +01:00
Patryk Obara
3b5c3beacf Add an option to list all warnings
Sorted list makes it easier to make a diff of two build logs.
2019-12-12 21:24:40 +01:00
Patryk Obara
c422854482 Add an option to group warnings by files
This change makes it easier to track code areas, that require attention.
2019-12-12 21:24:40 +01:00
Patryk Obara
1f67a5ee7a Set the default max limit of warnings to 0
Most linters behave this way, so it will fit the users' expectations.

Make -m optional, this makes the script a little bit easier to use.
Behaviour of MAX_WARNINGS and using -1 to disable the check is
preserved.
2019-12-12 21:24:40 +01:00
krcroft
d22d48b527 Add all OSes to the workflow 2019-12-11 20:30:19 +01:00
krcroft
343c85fa17 Add empty file to hide automator warning 2019-12-11 20:30:19 +01:00
krcroft
be4d063415 Allow extra arguments to become ./configure flags 2019-12-11 20:30:19 +01:00
krcroft
4a2eacc014 Add ability to exclude packages by pattern 2019-12-11 20:30:19 +01:00
krcroft
d12172b8a4 Add ncurses to installer packages 2019-12-11 20:30:19 +01:00
krcroft
eb9c0a8ec3 Ensure make uses ASCII-only characters 2019-12-11 20:30:19 +01:00
krcroft
92266db4f6 Add "warnmore" build-type to the build script 2019-12-11 20:30:19 +01:00
krcroft
5beac8e310 Remove unecessary string quotes 2019-12-11 20:30:19 +01:00
krcroft
7fe6f7f04c Add -DNDEBUG to common release flags 2019-12-11 20:30:19 +01:00
krcroft
b55b43f543 Use PRIuPTR and define it for Windows GCC 64-bit 2019-12-03 05:12:28 +01:00
Patryk Obara
719536341d Use make's output-sync to prevent log corruption
This works out of the box on Linux and MSYS2, but does not work on
macOS - Xcode supplied make does not support this option, so GNU make is
used instead.

Unfortunately, adding new package on macOS did not invalidate the cache,
this package removes the brew cache from macOS job to avoid this problem
in the future.

Fixes: #53
2019-11-26 04:48:16 +01:00
krcroft
0f11ab8ecb Refactor the build and list-packages scripts
Until now the build and package scripts have supported
several architectures, compilers, build types, package-managers,
and bit-depth targets.

The code might be maintainable if left as-such, however we have plans
to continue expanding the number of architectures (ARM, PPC, ... ),
operating systems (Android, BSDs, ...), and build variations
amung those.

The scripts (regardless of language) would only grow in complexity
as more variations are added. Thus, we needed a solution that can
scale without adding complexity.

To achieve this, the scripts were refactored as follows:
 - all "data" was moved out of code into configuration files
 - A back-end "Automator" engine was written to parse the
   data based on generic variables fed to it by a front-end
   script
 - build.sh and list-packages.sh were re-authored as thin front-end
   scripts that drive the automator
 - Their CLI's were retained so there has been very little change
   needed to the CI invocation lines.  The only changes have been to
   clarify the existing arguments improved based on feedback, ie:
   --build-type release, --build-type debug instead of fast, small
2019-11-24 15:16:44 +01:00
krcroft
fd74aa0720 Allow maximum-issues to be set via command-line
This change allows the maximum issues to be passed in as an argument.
If nothing is passed, then the existing build-in maximum is
used.

Retaining the existing built-in value makes sense for home
users to keep track of their local build (otherwise they would have
to remember the prior number of warnings and pass that value
in for subsequent builds).

Motivation: until now the built-in maximum covers the build permutation
that happens to generate the most warnings versus other builds.
In some cases new warnings may not be cause if they elicit a warning
from the lesser-warning build(s) or compilers, but not in the
maximum-warning build.

This change lets us tighten-down the warning uniquely for each build,
so we can be sure all new warnings are flagged to the developer.
2019-11-24 15:16:44 +01:00
Patryk Obara
e5d43e1b8f Update allowed warnings limit 2019-11-23 18:46:05 +01:00
Patryk Obara
63c946a79c Update allowed warnings limit 2019-11-16 04:31:19 +01:00
Patryk Obara
5b99e786f0 Colorize linter output 2019-11-16 02:27:24 +01:00
Patryk Obara
9a296eded9 Force python3 pylint
Some distributions provide python2 version of pylint package by default,
but all provide pylint for python3 in some package.  Python 2 reaches
EOL in few months, so there's no reason to support it.

This prevents our scripts from being accidentally marked invalid due to
language changes between python 2 and 3.  Also, newer pylint has nicer
output, that provides exact module filename straight in the warning.
2019-11-16 02:27:24 +01:00
Patryk Obara
2b386fbf52 List files before running linters
Makes it more readable for human consumption. Also, redirect initial
output to stderr to fix e.g. output to json file.
2019-11-16 02:27:24 +01:00
Patryk Obara
8ea7bcf762 Remove -DWIN32 from build.sh 2019-11-14 23:17:54 +01:00
Patryk Obara
1f07886767 Propagate return code in the msys2 bash wrapper
Fixes: #41
2019-11-14 23:17:54 +01:00
Patryk Obara
2bfae63f1f Run fast script linters before heavier analysis
Includes two small scripts: verify-bash.sh for running shellcheck, and
verify-python.sh for running pylint.

.pylint rc files is a default configuration file generated by
pylint 2.3.1, with one change (min-similarity-lines changed
from 4 to 10).
2019-11-14 20:33:36 +01:00
Patryk Obara
e954fe3237 Remove unused bash variable
Reported by shellcheck 0.7.0 (SC2034)
2019-11-14 20:33:36 +01:00
Patryk Obara
6de2e6bd41 Remove unnecessary use of a comprehension
Reported by pylint 2.4.4 (unnecessary-comprehension)
2019-11-14 20:33:36 +01:00
Patryk Obara
3b0a62ad4c Change module documentation to a raw string
Prevents anomalous-backslash-in-string ('\m') pylint warning.
2019-11-14 20:33:36 +01:00