Commit Graph

60 Commits

Author SHA1 Message Date
Ivan Kravets af5a820862 Rename "load_project_ide_data" to the "load_build_metadata" 2022-05-14 16:29:41 +03:00
Valerii Koval ab3c832f5e Pylint fix 2022-04-27 21:15:08 +03:00
Valerii Koval e69fd5e682 Minor improvements to check tools
- Better handling of unusual macro for PVS-Studio
- Fail the analysis if Cppcheck exited with an internal error
2022-04-27 20:45:21 +03:00
Valerii Koval 285f19e132 Properly handle cases when path to a file with a defect is unknown
Resolves #4237
2022-04-27 20:40:55 +03:00
Ivan Kravets 5a0a215bfc Use PY3 super() zero-argument syntax 2022-04-15 14:44:30 +03:00
Ivan Kravets d86f7fc25e Added ability to override a tool version using the "platform_packages" option // Resolve #3798 2022-04-01 22:05:30 +03:00
Zach Zodkoy 6123d6f9bf Don't append --checks=* when the --config or --config-file flags are set (#4210)
Appending --checks=* causes clang-tidy to ignore the flags --config
and --config-file, which breaks the ability to use a clang-tidy file
2022-03-30 11:47:14 +03:00
Ivan Kravets 6afb53dd7d PyLint fixes 2022-03-27 22:34:22 +03:00
Ivan Kravets 41144bffeb Reset custom project config per command 2022-03-08 18:00:10 +02:00
Ivan Kravets 452a76105f Update command titles 2022-02-11 22:33:33 +02:00
Ivan Kravets 4687665ff3 Improved support for projects located on a network share // Resolve #3417 , Resolve #3926 , Resolve #4102 2021-11-12 15:17:25 +02:00
Ivan Kravets 4839fe37a3 Improved PlatformIO directory interpolation (${platformio.***_dir}) in “platformio.ini” configuration file // Resolve #3934 2021-10-24 18:19:40 +03:00
Valerii Koval 6008275aae Properly handle in-progress C++ standards when invoking Cppcheck // Resolve #3944 (#4070) 2021-09-29 14:46:02 +03:00
Ivan Kravets 131f4be4ea Fix PyLint's "use-dict-literal" and "use-list-literal" 2021-08-28 13:14:40 +03:00
Ivan Kravets d819617d2b Specify encoding for "open()" functions 2021-08-28 13:10:07 +03:00
Ivan Kravets 27feb1ddd7 Added support for Click 8.0; updated other deps 2021-05-19 19:43:41 +03:00
Ivan Kravets a78db17784 Drop support for Python 2 2021-03-19 00:21:44 +02:00
Ivan Kravets c0357daf01 Remove Python 2 code 2021-03-17 21:08:06 +02:00
valeros 44b85f6e4b Switch Cppcheck to analyze project per file // Issue #3797
Cppcheck doesn't provide a proper report when one of the files in the check list is broken.
If we run the analysis on a per-file basis, then Cppcheck will be able report at least defects
from valid source files.
2021-03-11 13:49:27 +02:00
GovorovViva64 72ebaddcb8 Handle possible whitespaces in project path for PVS-Studio (#3849) 2021-03-04 22:22:09 +02:00
Ivan Kravets 58947d91a6 PyLint fixes 2021-02-27 17:13:30 +02:00
valeros 6e958b8415 Handle possible issues when check tool cannot be executed // Resolve #3753
Now, each tool individually decides under what conditions the check is considered failed.
2020-12-22 00:21:32 +02:00
Ivan Kravets 80c1774a19 Docs: PlatformIO Core 5.0: new commands, migration guide, other improvements 2020-08-28 14:08:26 +03:00
Valerii Koval 3e72f098fe Updates for PIO Check (#3640)
* Update check tools to the latest versions

* Use language standard when exporting defines to check tools

* Buffer Cppcheck output to detect multiline messages

* Add new test for PIO Check

* Pass include paths to Clang-Tidy as individual compiler arguments

Clang-tidy doesn't support response files which can exceed command
length limitations on Windows

* Simplify tests for PIO Check

* Update history

* Sync changelog
2020-08-25 21:19:21 +03:00
Ivan Kravets 64ff6a0ff5 Switch legacy core package manager to the new 2020-08-13 18:30:04 +03:00
Ivan Kravets 0eb8895959 Add support for “globstar/**” (recursive) pattern 2020-05-26 14:25:28 +03:00
Ivan Kravets 560699fc6b Apply formatting 2020-04-26 12:58:05 +03:00
Valerii Koval c03f93521b Refactor PIO Check feature (#3478)
* Add new option --skip-packages for check command

Check tools might fail if they're not able to preprocess source
files, for example, Cppcheck uses a custom preprocessor that is
not able to parse complex preprocessor code in zephyr framework).
Instead user can specify this option to skip headers included from
packages and only check project sources.

* Fix toolchain built-in include paths order
C++ and fixed directories should have higher priority

* Refactor check feature

The main purpose is to prepare a more comprehensive build environment.
It's crucial for cppcheck to be able to check complex frameworks like
zephyr, esp-idf, etc. Also detect a special case when cppcheck fails to check
the entire project (e.g. a syntax error due to custom preprocessor)

* Add new test for check feature

Tests ststm32 platform all tools and the main frameworks

* Update check tools to the latest available versions

* Test check tools and Zephyr framework only with Python 3

* Tidy up code

* Add history entry
2020-04-26 00:10:41 +03:00
Valerii Koval fd91819b2c Fix missing include paths for check tools
Includes are now split by scopes and imported as a dictionary
2020-04-21 19:26:00 +03:00
valeros baa7aab1d7 Specify C++ as the language for .ino files when preprocessing them for PVS-Studio // Resolve #3450 2020-04-07 11:35:17 +03:00
Ivan Kravets a78b461d45 Code formatting 2020-02-08 19:10:15 +02:00
valeros fe174e35c8 Suppress warnings from packages dir instead of core dir for CppCheck 2020-02-06 23:48:13 +02:00
valeros d2033aacea Remove the entire folder with temp files used by pvs-studio tool 2020-02-06 23:21:27 +02:00
Valerii Koval 46a9c1b6b2 Add initial support for PVS-Studio check tool (#3357)
* Add initial support for PVS-Studio check tool

* Enable all available PVS-Studio analyzers by default

* Add tests for PVS-Studio check tool

* Improve handling check tool extra flags that contain colon symbol
2020-01-23 12:57:54 +02:00
Ivan Kravets 6809da0353 Replace os.path.abspath by realpath 2019-11-15 16:02:15 +02:00
Ivan Kravets 95c1b0214c Rename "check_pattern" to "check_patterns" 2019-11-07 15:24:47 +02:00
valeros 182835fabf Rename check_patterns option to check_pattern 2019-11-05 11:36:20 +02:00
Ivan Kravets 3289e84b21 Refactor PIO Check from "check_filters" to "check_patterns" 2019-11-04 18:22:28 +02:00
Ivan Kravets 7784743cb1 Switch to default values from project configuration options 2019-11-02 19:44:28 +02:00
valeros d815daed29 Allow specifying defect level that will cause failure 2019-10-30 13:38:46 +02:00
valeros c4e7674585 Don't pass header files to Cppcheck 2019-10-30 12:23:33 +02:00
valeros 0194e09410 Use simple abspath to get absolute path to file with defect 2019-10-28 18:37:14 +02:00
valeros 187e30d055 Export full path to file with defect 2019-10-28 18:30:22 +02:00
valeros 39a7062503 Fix types of defect fields column and line 2019-10-28 18:12:39 +02:00
valeros 5573c3871c Allow cppcheck suppress individual defects by default 2019-10-28 13:38:46 +02:00
valeros 48651286b6 Automatically detect C++ standard version when invoking cppcheck 2019-10-25 20:59:36 +03:00
valeros 0e7a2b3141 Automatically detect source files language when invoking cppcheck 2019-10-25 20:08:04 +03:00
valeros 4e43e7d3c3 Fix code formatting 2019-10-25 17:43:52 +03:00
valeros f3d8c30f95 Skip ignored environments when exporting check report in JSON format 2019-10-25 15:50:19 +03:00
valeros 4486a85d4c Introduce new flag --fail-on-defect to pio check 2019-10-25 15:40:50 +03:00