Commit Graph

53 Commits

Author SHA1 Message Date
dundargoc
4716a578ae docs: fix typos 2022-11-02 21:45:26 +08:00
zeertzjq
02efdb4d58
refactor: fix clang and PVS warnings (#19569)
The last commit didn't actually disable V1028 because of a typo.
Fix the typo so it is actually disabled.
2022-07-29 14:44:18 +08:00
zeertzjq
0b8bade493
build(pvscheck): disable PVS/V1028 (#19553)
Most casts where PVS warns for V1028 aren't added to prevent overflows
in the first place, but to avoid other warnings, like printf argument or
-Wconversion warnings. PVS/V1028 is more annoying than useful.
2022-07-29 10:32:00 +08:00
dundargoc
933274c438
fix/PVS #17863
* fix(PVS/V002): disable rule completely

V002: "Some diagnostic messages may contain incorrect line number in
this file." This particular check seems unreliable. It says on their
website https://pvs-studio.com/en/docs/warnings/v002/ that this warning
occurs when there are multiline pragmas, but there are none in
extmark.c.

* fix(PVS/V756): ignore "counter is not used inside a nested loop" warning

The nested loop starts with "AutoCmd *ac = ap->cmds" so "ap" is
definitely used.

* fix(PVS/V560): disable "a part of conditional expression is always true"

* fix(PVS/V614): potentially uninitialized variable 'blen' used
2022-04-24 18:51:22 -07:00
dundargoc
6d8cafed40
ci: exclude lua-cjson from PVS report #15859 2021-10-05 05:02:49 -07:00
Justin M. Keyes
03ed72642d fix(pvs): Exclude xdiff from analysis
ref 088161a945
ref fbe88ef8f5
2021-09-24 03:26:31 -07:00
Justin M. Keyes
508fcdadb7 fix(PVS): disable "typo" warnings V1051, V1074
PVS is worried about typos. Now we need it to stop worrying...
Disable these checks entirely, they are all false positives.

tui.c:1873        V1074   Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos.
tui.c:1983        V1074   Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos.

regexp_nfa.c:6189 V1051   Consider checking for misprints. It's possible that the 'pim->result' should be checked here.
screen.c:2928     V1051   Consider checking for misprints. It's possible that the 'vcol_sbr' should be checked here.
screen.c:3187     V1051   Consider checking for misprints. It's possible that the 'line_attr' should be checked here.
screen.c:3267     V1051   Consider checking for misprints. It's possible that the 'multi_attr' should be checked here.
screen.c:4747     V1051   Consider checking for misprints. It's possible that the 'redraw_next' should be checked here.
syntax.c:3448     V1051   Consider checking for misprints. It's possible that the 'arg_end' should be checked here.
syntax.c:3625     V1051   Consider checking for misprints. It's possible that the 'arg_end' should be checked here.
tui.c:1836        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
tui.c:1863        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
tui.c:1882        V1051   Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
2021-09-24 03:22:26 -07:00
Dundar Göc
9f6989d551 chore: PVS/V1042 - ignore warning globally.
V1042 is a warning that a file has a copyleft license, which is an
irrelevant warning to open-source projects.
2021-07-17 17:27:17 +02:00
James McCoy
794a287846
fix(pvscheck): Switch URL to pvs-studio.com
[skip ci]
2021-04-29 20:04:29 -04:00
James McCoy
088161a945
pvs: Exclude xdiff from analysis and comment munging 2020-11-10 10:00:25 -05:00
James McCoy
65993c444a
Use the free PVS-Studio license
As of release 7.10, PVS Studio requires a license, even for the "check
me" comment based analyzing.
2020-11-10 09:42:28 -05:00
Ihor Antonov
dd94165f4e pvscheck.sh: Remove --verbose flag #10473
pvscheck.sh gives error:
    Flag could not be matched: verbose
2019-07-12 11:36:19 +02:00
Justin M. Keyes
f2cc9e8826 pvscheck.sh: set --sourcetree-root [ci skip]
Reverts previous experiment. PVS root is working correctly, one can
observe this in the PVS-studio.err file, for example:

    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:51:1: warning: V677 ...
    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:132:1: warning: V677 ...
    ./src/nvim/fileio.c:1382:1: warning: V1026 ...
    ./src/nvim/fileio.c:1388:1: warning: V1026 ...

The "./src/nvim/…" paths are correctly rooted, yet PVS somehow still
thinks it should analyze "/usr/local/clang-7.0.0/…".

See also: https://stackoverflow.com/q/44906903
2019-01-19 22:13:58 +01:00
Justin M. Keyes
391f0c1ce7 pvscheck.sh: do not set --sourcetree-root [ci skip]
System headers should be ignored by PVS, but somehow aren't.
See also: https://stackoverflow.com/q/44906903
2019-01-19 13:04:32 +01:00
Justin M. Keyes
e8137d263e pvscheck.sh: ignore stddef.h
This system header should be ignored by PVS.
See also: https://stackoverflow.com/q/44906903
2019-01-18 02:43:42 +01:00
Justin M. Keyes
0d66cdc6f9
pvscheck.sh: Fix download URL #9500
- old URL redirects to https://www.viva64.com/en/pvs-studio-download/
- page now contains tgz files for macOS and Linux; the pattern must
  match only the Linux URL
2019-01-14 00:23:28 +01:00
Justin M. Keyes
c8e78abaf9 pvscheck.sh: Skip install if dir exists 2019-01-08 01:30:46 +01:00
ZyX
4ce8521ee4 pvscheck: Disable V011 warning 2018-04-22 20:54:17 +03:00
ZyX
cb3bb0becb pvscheck: Add --update switch 2018-04-17 01:44:11 +03:00
ZyX
57c66bc168 pvscheck: Remove outputs before running plog-converter
plog-converter behaviour is not the best one when creating fullhtml report and
directory already exists: it puts report inside an existing directory. Not sure
what exactly it does if inside exists as well, but if I am not mistaking report
will not be created.
2018-04-17 01:37:58 +03:00
ZyX
6b84f7813c pvscheck: Also provide source tree root to plog-converter 2018-04-02 00:16:22 +03:00
ZyX
65d0b8ed32 pvscheck: Also produce fullhtml reports 2018-04-02 00:15:31 +03:00
ZyX
7eceac218e pvscheck: Make realdir work with nonexistent directories 2018-04-02 00:07:05 +03:00
James McCoy
4e5e6506b5
pvscheck: Ignore exit code of pvs-studio-analyzer
Since its typically non-zero, the script immediately exits instead of
converting the binary log into useful formats.
2018-03-11 18:01:44 -04:00
Justin M. Keyes
84d9245c70 pvscheck.sh: auto-detect URL by default
The hardcoded URL breaks very often, this confuses people.
Instead, auto-detect if no URL is provided.

Also auto-detect if the script is invoked with no arguments.
2017-11-21 01:38:30 +01:00
ZyX
aa3e3b4ca6 pvscheck: Add --environment-cc switch
To be used to make bot-ci able to use clang-4.0 without hacks.

[ci skip]
2017-07-04 19:25:05 +03:00
Justin M. Keyes
2b377d89db scripts/pvscheck.sh: fix function rename 2017-06-25 07:53:27 +02:00
Justin M. Keyes
4b08b5d194 scripts/pvscheck.sh: HACK: de-parallelize on CI
https://github.com/neovim/bot-ci/pull/105#issuecomment-309282132
2017-06-25 07:35:01 +02:00
Justin M. Keyes
a469704495 scripts/pvscheck.sh: HACK: de-parallelize on CI
References https://github.com/neovim/bot-ci/pull/105
2017-06-25 03:26:24 +02:00
Daniel Hahler
45df8f77df scripts/pvscheck.sh: fixes
[ci skip]
2017-06-17 20:37:13 +02:00
James McCoy
90f20bd7b1 pvscheck: Fix argument handling in do_recheck
[ci skip]
2017-06-09 16:42:43 -04:00
ZyX
c585a72cdc pvscheck: Provide arguments to patch_sources in correct order 2017-05-20 05:06:16 +03:00
ZyX
7f24736ebc pvscheck: Handle invalid option error gracefully 2017-05-20 03:44:23 +03:00
ZyX
d72df05b93 pvscheck: Add --only-analyse mode 2017-05-20 03:35:50 +03:00
ZyX
4f4d21693b pvscheck: Use absolute path for finding test-include.c
It was currently unknown in which directory create_compile_commands will end up 
in.

[ci skip]
2017-05-02 21:53:16 +03:00
ZyX
0c6e0460b6 pvscheck: When using --recheck rerun build
[ci skip]
2017-05-02 18:40:51 +03:00
ZyX
3638d28f68 pvscheck: Add --deps to build with all dependencies
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
97806ee6d6 pvscheck: Add --pvs-install mode
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
68945ead63 pvscheck: Refactor script so that it only cds in a subshell
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
4cb61aa742 pvscheck: Create getopts_long implementation
Needed as argument list is growing large and I absolutely do not find short
options provided by getopts being particularly readable for unfamiliar commands.

[ci skip]
2017-05-02 18:40:22 +03:00
ZyX
15d39022ab pvscheck: Add --pvs key to pvscheck.sh
[ci skip]
2017-05-02 04:04:20 +03:00
ZyX
7fc3cccfaa pvscheck: Update pvs-studio URL
[ci skip]
2017-05-02 04:04:10 +03:00
ZyX
bcc97afbd2 pvscheck: Do not use test x
[ci skip]
2017-05-02 04:03:50 +03:00
ZyX
3351016dcd scripts: Add newline after the comment 2017-04-19 19:11:37 +03:00
ZyX
4555bf9e7f scripts: Allow patching only build files 2017-04-19 19:10:53 +03:00
ZyX
9fd048d901 scripts: Do not patch already patched sources in patch mode
Also do not patch header files, that is not needed.
2017-04-19 19:04:00 +03:00
ZyX
38b2bc9a88 scripts: Make pvs do not patch separate directory, add patch mode 2017-04-19 18:55:32 +03:00
ZyX
55292685d3 pvscheck: Add --recheck argument 2017-04-10 14:07:26 +03:00
ZyX
2b13c87fa2 pvscheck: Do not use --depth 2017-04-10 13:47:31 +03:00
ZyX
d7086f44f4 pvscheck: Do not trace help 2017-04-10 13:45:33 +03:00